MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 232

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

The class name identifies the ActionScript class to which the screen is assigned. By default, a
slide screen is assigned to the
mx.screens.Form
and properties that are available for the screen. For more information on ActionScript classes,
see Chapter 10, "Creating Custom Classes with ActionScript 2.0" in Using ActionScript in
Flash.
The Property inspector indicates the registration point in the x and y coordinate fields and in
the registration point grid. For more information, see
screen (Flash Professional only)" on page
for greater control in manipulating screen content. For example, if you want to create a
spinning shape in the center of a screen, you can reposition the screen registration point at the
center of the screen and rotate the screen around its registration point.
How screens interact with ActionScript (Flash Professional only)
Screens are similar to nested movie clips in the way that they interact with ActionScript. (For
more information, see
Remember the following guidelines when you use ActionScript with screens:
When you select a screen in the Screen Outline pane and add ActionScript, the script is added
directly to the screen as an object action (much as ActionScript is added directly to a movie
clip). It's usually best to use object actions for simple code (such as creating navigation between
screens) and external ActionScript files for more complex code.
For best results, organize the document structure and finalize screen names before adding
ActionScript. If you rename a screen, the instance name is automatically changed, and you
must update the instance names in any ActionScript code you have written.
If you want to add a frame action to the Timeline for a screen, you must select the screen,
expand the Timeline (collapsed by default), and select the first frame in the Timeline.
However, it's usually best to use an external ActionScript file, rather than a frame action, for
complex code on a screen.
You cannot view or manipulate the main Timeline for a screen-based document. However, you
can target the main Timeline using
Each screen is automatically associated with ActionScript, based on its class. (For more
information, see
can change the class to which that screen is assigned, and you can set some parameters for a
screen in the Property inspector. For more information, see
for a screen (Flash Professional only)" on page
Use the Screen class, Slide class, and Form class to control screens with ActionScript.
Use components whenever possible to create interactivity. Put no more than 125 total
component instances in a single FLA file.
To create navigation between slides, use
rootSlide.currentSlide
Do not try to do slide navigation inside of
Do not add an
232
Chapter 12: Working with Screens (Flash Professional Only)
mx.screens.Slide
class. You can assign the screen to a different class to modify the methods
"Nested movie clips" on page
_root
"Slide screens and form screens (Flash Professional only)" on page
.
or
on(keydown)
on(keyup)
class, and a form screen is assigned to the
"Setting properties and parameters for a
223. You might want to move the registration point
22.) However, there are some differences.
in a target path.
"Setting properties and parameters
223.
. For example, to get the current slide, use
rootSlide
or
on(reveal)
on(hide)
event to ActionScript code controlling a screen.
218.) You
handlers.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents