User Guide
Screen class (Flash Professional only) 651
Screen class (Flash Professional only)
The Screen class is the base class for screens you create in the Screen Outline pane in Flash MX
Professional 2004. Screens are high-level containers for creating applications and presentations.
For an overview of working with screens, see Chapter 12, “Working with Screens (Flash
Professional Only),” in Using Flash.
The Screen class has two primary subclasses: Slide and Form.
The Slide class provides the runtime behavior for slide presentations. The Slide class provides
built-in navigation and sequencing capabilities, and lets you easily attach transitions between
slides using behaviors. Slide objects maintain “state,” and allow the user to advance to the next or
previous slide/state: when the next slide is shown, the previous slide is hidden. For more
information about using the Slide class to control slide presentations, see “Slide class (Flash
Professional only)” on page 693.
The Form class provides the runtime environment for form applications. Forms can overlay and
contain, or be contained by, other components. Unlike slides, forms don’t provide any sequencing
or navigation capabilities. For more information, see “Form class (Flash Professional only)”
on page 430.
The Screen class provides functionality common to both slides and forms.
Screens know how to manage their children Every screen includes a built-in property that
contains a list of that screen’s child screens, known as a collection. This collection is determined
by the screen hierarchy in the Screen Outline pane. Screens can have any number of children (or
none), which themselves can have children.
Screens can hide and show their children Because a screen is, essentially, a collection of
nested movie clips, a screen can control the visibility of its children. For form applications, all of a
screen’s children are visible by default at the same time; for slide presentations, individual screens
are typically shown one at a time.
Screens broadcast events You can, for example, trigger a sound to play, or start playing some
video, when a particular screen becomes visible.
Loading external content into screens (Flash Professional only)
The Screen class extends the Loader class (see “Loader component” on page 484), which lets you
easily manage and load external SWF and JPEG files. The Loader class contains a
contentPath
property, which specifies the URL of an external SWF or JPEG file, or the linkage identifier of a
movie clip in the library.
Using this feature, you can load an external screen tree (or any external SWF file) as a child of any
screen node. This provides a useful way to make your screen-based media modular and divide it
into separate SWF files.
CHAPTER 6
Components Dictionary