MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 59

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

Advertisement

Each frame in the Timeline of a button symbol has a specific function:
The first frame is the Up state, representing the button whenever the pointer is not over
the button.
The second frame is the Over state, representing the button's appearance when the pointer is
over the button.
The third frame is the Down state, representing the button's appearance as it is clicked.
The fourth frame is the Hit state, defining the area that responds to the mouse click. This area
is invisible in the SWF file.
You can also create a button using a movie clip symbol or a button component. There are
advantages to using each type of button, depending on your needs. Creating a button using a
movie clip enables you to add more frames to the button or add more complex animation.
However, movie clip buttons have a larger file size than button symbols. Using a button
component allows you to bind the button to other components, to share and display data in an
application. Button components also include prebuilt features, such as accessibility support, and
can be customized. Button components include the PushButton and RadioButton. For more
information, see "Button component" in Using Components.
For a lesson on creating buttons with ActionScript, select Help > How Do I > Quick Tasks >
Write Scripts with ActionScript.
To create a button:
Select Edit > Deselect All to ensure that nothing is selected on the Stage.
1.
Select Insert > New Symbol, or press Control+F8 (Windows) or Command+F8 (Macintosh).
2.
To create the button, you convert the button frames to keyframes.
In the Create New Symbol dialog box, enter a name for the new button symbol, and for
3.
Behavior select Button.
Flash switches to symbol-editing mode. The Timeline header changes to display four
consecutive frames labeled Up, Over, Down, and Hit. The first frame, Up, is a blank
keyframe.
To create the Up state button image, use the drawing tools, import a graphic, or place an
4.
instance of another symbol on the Stage.
You can use a graphic or movie clip symbol in a button, but you cannot use another button in
a button. Use a movie clip symbol if you want the button to be animated.
Click the second frame, labeled Over, and select Timeline > Keyframe.
5.
Flash inserts a keyframe that duplicates the contents of the Up frame.
Change the button image for the Over state.
6.
Creating buttons
59

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents