Screen class

The Screen class is the base class for screens that you create in the Screen Outline pane in Adobe Flash CS3 Professional. Screens are high-level containers for creating applications and presentations. For an overview of working with screens, see "Working with Screens" in Using Flash.

Note: The Screens feature has been deprecated in Flash CS3. You can open and edit existing Screens-based FLA files created in earlier versions of Flash, but you cannot create new Screens-based documents. Also, the Screen class is supported only if you are working in a document that specifies ActionScript 2.0 in its Publish Settings.

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.

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.

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.

Related topics