Using components with screens – Adobe Flash Professional CS3 User Manual

Page 386

Advertising
background image

FLASH CS3

User Guide

380

Each screen is automatically associated with ActionScript, based on its class. You can change the class to which
that screen is assigned, and you can set some parameters for a screen in the Property inspector.

To control screens with ActionScript, use the Screen class, Slide class, and Form class.

To create interactivity, use components whenever possible. Put no more than 125 total component instances in a
single FLA file.

To create navigation between slides, use

rootSlide

. For example, to get the current slide, use

rootSlide.currentSlide

.

Do not try to do slide navigation inside of

on(reveal)

or

on(hide)

handlers.

Do not add an

on(keydown)

or

on(keyup)

event to ActionScript code controlling a screen.

For more information on controlling screens with ActionScript, see “Screen class”, “Form class”, and “Slide class”, in
the ActionScript 2.0 Components Language Reference.

For information on the Object class and the

onclipEvent()

event handler, see Object and onClipEvent handlerin

ActionScript 2.0 Language Reference.

To learn more about creating screen-based documents that use ActionScript, see "About organizing code for screens"
in Using ActionScript 2.0 Components.

See also

“About nested movie clips and parent-child hierarchy” on page 72

Using components with screens

To create complex, structured applications in Flash, use components with screens. Components are especially useful
with forms to create structured applications that show data and enable nonlinear user interactivity. For example, use
forms to populate a container component.

To create custom navigation between components, use the Focus Manager when you use components with screens.
The Focus Manager specifies the order in which components receive focus when a user presses the Tab key to
navigate in an application. For example, customize a form application so that a user can press Tab to navigate fields
and press Return (Macintosh) or Enter (Windows) to submit the form.

For information on the Focus Manager, see “Creating custom focus navigation” in Using ActionScript 2.0 Components
and “FocusManager class” in ActionScript 2.0 Components Language Reference.

You can also use the Accessibility panel to create a tab order.

See also

“Viewing and creating tab order and reading order” on page 360

Advertising