O'Reilly logo

Essential ActionScript 3.0 by Colin Moock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Display List

As we've just discussed, the core display classes represent the types of graphical content available in ActionScript. To create actual graphics from those theoretical types, we create instances of the core display classes and then add those instances to the display list. The display list is the hierarchy of all graphical objects currently displayed by the Flash runtime. When a display object is added to the display list and is positioned in a visible area, the Flash runtime renders that display object's content to the screen.

The root of the display list is an instance of the Stage class, which is automatically created when the Flash runtime starts. This special, automatically created Stage instance serves two purposes. First, it acts as the outermost container for all graphical content displayed in the Flash runtime (i.e., it is the root of the display list). Second, it provides information about, and control over, the global characteristics of the display area. For example, the Stage class's instance variable quality indicates the rendering quality of all displayed graphics; scaleMode indicates how graphics scale when the display area is resized; and frameRate indicates the current preferred frames per second for all animations. As we'll see throughout this chapter, the Stage instance is always accessed relative to some object on the display list via the DisplayObject class's instance variable stage. For example, if output_txt is a TextField instance currently ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required