![MACROMEDIA FLASH 8-FLASH Tutorials Manual Download Page 131](http://html2.mh-extra.com/html/macromedia/flash-8-flash/flash-8-flash_tutorials-manual_3348958131.webp)
Add an action to a button 131
7.
With the playhead still on Frame 15, select the button shape on the
Stage, and in the Property inspector select a bright shade of red from the
Fill Color pop-up menu.
8.
In the Timeline, click any frame between Frames 1 and 15. In the
Property inspector, select Shape from the Tween pop-up menu.
Drag the playhead from Frames 1 to 15 to see the color change.
Add an action to a button
When the user clicks the button and the tweened animation plays, you
want the playhead to move to the end of the Button Animation Timeline
and then stop. You’ll use ActionScript to control playhead movement in
a Timeline.
1.
Add a new layer to the Button Animation Timeline and name it
Actions
.
2.
On the Actions layer, add a keyframe to Frame 15 by pressing F6.
3.
Open the Actions panel (Window > Actions) and if necessary, enlarge it
to view both the Actions toolbox and the Script pane.
4.
With Frame 15 of the Actions layer selected, go to the Global Functions
> Timeline Control category of the Actions toolbox and double-click
stop
.
The
stop
action lets you specify that the playhead stop when it reaches
Frame 15.
In the Button Animation Timeline, Frame 15 of the Actions layer now
displays a small
a,
which indicates that an action is attached to
that frame.
5.
Click Scene 1, above the Stage, to exit symbol-editing mode and return
to the main document.
6.
Click the pop-up menu control in the upper-right side of the Actions
panel, and select Close Panel.
7.
Select Control > Enable Simple Buttons so you can test the animated
button.
8.
On the Stage, move the pointer over the button and click the button.
9.
Select Control > Enable Simple Buttons to deselect that feature.
Summary of Contents for FLASH 8-FLASH
Page 1: ...Flash Tutorials...
Page 10: ...10 Contents...
Page 12: ...12 Introduction...
Page 42: ...42 Basic Tasks Creating a banner Part 1...
Page 78: ...78 Basic Tasks Creating a banner Part 3...
Page 88: ...88 Basic Tasks Create Accessible Flash Content...
Page 106: ...106 Basic Tasks Create an Application...
Page 116: ...116 Basic Tasks Use Layout Tools...
Page 124: ...124 Basic Tasks Create Symbols and Instances...
Page 134: ...134 Basic Tasks Add Button Animation and Navigation...
Page 144: ...144 Basic Tasks Create a Presentation with Screens Flash Professional Only...
Page 192: ...192 Creating Graphics Applying Gradients...
Page 198: ...198 Creating Graphics Apply Graphic Filters and Blends Flash Professional Only...
Page 224: ...224 ActionScript Use Script Assist mode...
Page 268: ...268 ActionScript Work with Objects and Classes...
Page 270: ...270 Data Integration Overview Flash Professional Only...