9XML AND DYNAMIC CONTENT

Many Flash games are self-contained SWF files. They don’t load any additional files in and they don’t send any type of data out; however, this closed architecture prohibits a number of scenarios, such as:

  • Externalized content (such as puzzle data or even game copy)
  • The ability to save to a public high-score table
  • Localization to other languages
  • Level editors and user-generated content

In this chapter, we’ll explore how features like these can be implemented using a variety of features in ActionScript.

Bringing Data In: Understanding the URLLoader Class

The core component behind sending and loading basic text, XML, and binary data is the URLLoader class. It takes only a few lines of code to load some data and begin ...

Get Real-World Flash Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.