326
USING FLASH CS4 PROFESSIONAL
Working with screens
•
The contentPath parameter is an absolute or relative URL indicating the file to load when the
Loader.load()
method is called. A relative path must point to the SWF file loading the content. The URL must be in the same
subdomain as the URL where the Flash content currently resides. For use in Flash Player or with the Test Movie
command, all SWF files must be stored in the same folder, and the filenames cannot include folder or disk-drive
specifications. The default value is undefined until the load starts. This parameter is inherited from the Loader
component.
Specify parameter settings for a screen
1
Select a screen in the Screen Outline pane.
2
Select Window
> Properties.
3
In the Property inspector, click the Parameters tab.
4
Click the setting for a parameter, and select a setting from the pop-up menu.
Creating controls and transitions for screens with behaviors
To create controls and transitions for screens, use behaviors. Controls enable the flow between screens—for example,
you can go to another screen, hide a screen, or show a screen. Transitions create visual animations that play as the Flash
document display changes from one screen to another.
Behaviors are built-in ActionScript scripts that you add to an object, such as a screen, to control that object. Behaviors
let you add the power, control, and flexibility of ActionScript coding to your document without having to create the
ActionScript code yourself. Behaviors are available for a variety of objects in Flash, including movie clips, text fields,
and video and sound files.
To learn more about creating screen-based documents that use ActionScript, see "About organizing code for screens"
in
Using ActionScript 2.0 Components
.
Add controls to screens using behaviors
To add a control to a screen using a behavior, attach the behavior to a trigger—a button, movie clip, or screen—and
target the screen to affect with the behavior. Select the event that triggers the behavior.
To control slide screens, add the following behaviors: Go to First Slide, Go to Last Slide, Go to Next Slide, Go to
Previous Slide, and Go to Slide (specify slide name).
Note:
Go to Next Slide and Go to Previous Slide move to screens on the same level, not to parents or children.
To control slide or form screens, add the following behaviors: Show a Specified Screen (if the screen was previously
hidden) or Hide a Specified Screen (if the screen was previously shown).
1
Select the button, movie clip, or screen that you want to trigger the behavior.
2
In the Behaviors panel, click the Add (+) button.
3
Select Screen, and select the desired control behavior from the submenu.
4
If the behavior requires that you select a target screen, the Select Screen dialog box appears. Select the target screen in
the tree control. Click Relative to use a relative target path, or Absolute to use an absolute target path, and click OK.
Note:
Some behaviors select a target screen by default; for example, the Go to First Slide screen automatically targets the
first screen. These behaviors do not show the Select Screen dialog box.
Updated 5 March 2009