Creating Instances; Creating Buttons - MACROMEDIA FLASH MX 2004-USING FLASH Use Manual

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

Advertisement

Creating instances

After you create a symbol, you can create instances of that symbol wherever you like throughout
your document, including inside other symbols. When you modify the symbol, Flash updates all
instances of the symbol.
Flash gives movie clip and button instances default instance names when you create them. From
the Property inspector, you can apply custom names to instances. You use the instance name to
refer to an instance in ActionScript. You must give each instance a unique name in order to
control it with ActionScript. For more information, see Chapter 5, "Handling Events," in Using
ActionScript in Flash.
To create a new instance of a symbol:
Select a layer in the Timeline.
1.
Flash can place instances only in keyframes, always on the current layer. If you don't select a
keyframe, Flash adds the instance to the first keyframe to the left of the current frame.
Note: A keyframe is a frame in which you define a change in the animation. For more information,
see "Working with frames in the Timeline" in Getting Started with Flash.
Select Window > Library to open the library.
2.
Drag the symbol from the library to the Stage.
3.
If you created an instance of a graphic symbol, select Insert > Timeline > Frame to add the
4.
number of frames that will contain the graphic symbol.
To apply a custom name to an instance:
Select the instance on the Stage.
1.
Select Window > Properties if the Property inspector is not visible.
2.
Enter a name in the Instance Name text box on the left side of the Property inspector (below
3.
the Symbol Behavior pop-up list).
After creating an instance of a symbol, you can use the Property inspector to specify color effects,
assign actions, set the graphic display mode, or change the behavior of the instance. The behavior
of the instance is the same as the symbol behavior, unless you specify otherwise. Any changes you
make affect only the instance and not the symbol. See
on page
62.

Creating buttons

Buttons are actually four-frame interactive movie clips. When you select the button behavior
for a symbol, Flash creates a Timeline with four frames. The first three frames display the
button's three possible states; the fourth frame defines the active area of the button. The
Timeline doesn't actually play; it simply reacts to pointer movement and actions by jumping to
the appropriate frame.
To make a button interactive, you place an instance of the button symbol on the Stage and assign
actions to the instance. You must assign the actions to the instance of the button in the
document, not to frames in the button's Timeline.
58
Chapter 3: Using Symbols, Instances, and Library Assets
"Changing instance properties"

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents