
165
USING FLASH CS4 PROFESSIONAL
Symbols, instances, and library assets
2
Select Insert > New Symbol, or press F8 (Windows) or F8 (Macintosh).
To create the button, you convert the button frames to keyframes.
3
In the Create New Symbol dialog box, enter a name for the new button symbol. For the symbol Type, 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.
4
To create the Up state button image, select the Up frame in the Timeline and then use the drawing tools, import a
graphic, or place an 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 to animate the button.
5
Click the Over frame, and select Insert > Timeline > Keyframe.
Flash inserts a keyframe that duplicates the contents of the Up frame.
6
Change or edit the button image for the Over state.
7
Repeat steps 5 and 6 for the Down frame and the Hit frames.
The Hit frame is not visible on the Stage, but it defines the area of the button that responds when clicked. The graphic
for the Hit frame must be a solid area large enough to encompass all the graphic elements of the Up, Down, and Over
frames. It can also be larger than the visible button. If you do not specify a Hit frame, the image for the Up state is used
as the Hit frame.
To create a disjoint rollover, in which moving the pointer over a button causes another graphic on the Stage to change,
place the Hit frame in a different location than the other button frames.
8
To assign a sound to a state of the button, select that state’s frame in the Timeline, select Window
> Properties, and
then select a sound from the Sound menu in the Property inspector.
9
When you finish, select Edit > Edit Document. To create an instance of the button in the document, drag the button
symbol from the Library panel.
See also
“
Using sounds in Flash
” on page 273
Enable, edit, and test buttons
By default, Flash keeps buttons disabled as you create them, to make it easier to select and work with them. When a
button is disabled, clicking the button selects it. When a button is enabled, it responds to the mouse events that you’ve
specified as if the SWF file were playing. You can still select enabled buttons. Disable buttons as you work, and enable
buttons to quickly test their behavior.
Enable and disable buttons
❖
Select Control > Enable Simple Buttons. A check mark appears next to the command to indicate buttons are
enabled. Select the command again to disable buttons.
Any buttons on the Stage now respond. As you move the pointer over a button, Flash displays the Over frame; when
you click within the button’s active area, Flash displays the Down frame.
Select, move, or edit an enabled button
❖
Do one of the following:
•
Use the Selection tool to drag a selection rectangle around the button.
Updated 5 March 2009