Chapter 4. Using ActionScript 3.0

In Chapter 3, "ActionScript 3.0 Fundamentals," you saw how the core ActionScript 3.0 language works, including some core language APIs. This chapter will expand on this by exploring the Flash APIs underlying the Flex framework.

To find out how to build an ActionScript application in Flex Builder, see Chapter 6, "Using Flex Builder."

The Flash Platform Framework

In the Flash platform, or one could say the "Flex ecosystem" as was coined previously, several blocks of APIs, classes, packages, and frameworks distinguish how one builds Flash-based rich Internet application (RIA) applications (see Figure 4-1).

Figure 4-1

Figure 4-1. Figure 4-1

  1. First, there are the core ActionScript 3.0 language elements, constructs, and classes. These classes reside at something Adobe calls the top level, or base, and are called the top-level classes. ActionScript 3.0 elements and top-level classes reside in the Flash Player or Tamarin virtual machine.

  2. Next, there are the Flash APIs belonging to the flash.* package. All these classes could actually be considered a framework of their own, although no one really calls it that. Although the hooks into the display and event Document Object Model (DOM) reside in the Flash Player, the classes themselves reside in the playerglobal.swc precompiled "framework," which must be used by any Flash or Flex compiler. Said another way, the actual classes ...

Get Professional Adobe® Flex® 3 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.