User Guide

Controlling instances with behaviors 65
To set the animation of a graphic instance:
1.
Select a graphic instance on the Stage and select Window > Properties.
2.
In the Property inspector, select an animation option from the pop-up menu below the
instance name:
Loop loops all the animation sequences contained in the current instance for as many frames
as the instance occupies.
Play Once plays the animation sequence beginning from the frame you specify to the end of
the animation and then stops.
Single Frame displays one frame of the animation sequence. Specify which frame to display.
Controlling instances with behaviors
You can use behaviors to control movie clip and graphic instances in a document without writing
ActionScript. Behaviors are prewritten ActionScript scripts that let you add the power, control,
and flexibility of ActionScript coding to your document without having to create the
ActionScript code yourself.
You can use behaviors with an instance to arrange it in the stacking order on a frame, as well as to
load or unload, play, stop, duplicate, or drag a movie clip, or to link to a URL.
In addition, you can use behaviors to load an external graphic or an animated mask into a
movie clip.
To control a movie clip with a behavior, you use the Behaviors panel to apply the behavior to a
triggering object, such as a button. You specify the event that triggers the behavior (such as
releasing the button), select a target object (the movie clip instance) that is affected by the
behavior, and when necessary, specify settings for the behavior parameters, such as a frame
number or label.
The behaviors in the following table are packaged with Flash MX 2004 and Flash MX
Professional 2004. For more information on embedded video behaviors, see “Controlling video
playback using behaviors” on page 191. For more information on controlling sounds with
behaviors, see “Controlling sound playback using behaviors” on page 206.
Behavior Purpose Select/input
Load Graphic Loads an external JPEG file into a
movie clip or screen.
Path and filename of JPEG file.
Instance name of movie clip or screen
receiving the graphic.
Load External Movie
Clip
Loads an external SWF file into a
target movie clip or screen.
URL of external SWF file.
Instance name of movie clip or screen
receiving the SWF file.
Duplicate Movieclip Duplicates a movie clip or screen Instance name of movie clip to
duplicate.
X-offset and Y-offset of pixels from
original to copy.
GotoAndPlay at
frame or label
Plays a movie clip from a particular
frame.
Instance name of target clip to play.
Frame number or label to play.