Controlling Instances With Behaviors - MACROMEDIA FLASH MX 2004-USING FLASH Use Manual

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

Advertisement

To set the animation of a graphic instance:
Select a graphic instance on the Stage and select Window > Properties.
1.
In the Property inspector, select an animation option from the pop-up menu below the
2.
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

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
playback using behaviors" on page
behaviors, see
"Controlling sound playback using behaviors" on page
Behavior
Load Graphic
Load External Movie
Clip
Duplicate Movieclip
GotoAndPlay at
frame or label
displays one frame of the animation sequence. Specify which frame to display.
191. For more information on controlling sounds with
Purpose
Loads an external JPEG file into a
movie clip or screen.
Loads an external SWF file into a
target movie clip or screen.
Duplicates a movie clip or screen
Plays a movie clip from a particular
frame.
"Controlling video
206.
Select/input
Path and filename of JPEG file.
Instance name of movie clip or screen
receiving the graphic.
URL of external SWF file.
Instance name of movie clip or screen
receiving the SWF file.
Instance name of movie clip to
duplicate.
X-offset and Y-offset of pixels from
original to copy.
Instance name of target clip to play.
Frame number or label to play.

Controlling instances with behaviors

65

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents