74
Chapter 9: Add Animation and Navigation to Buttons
8.
On the Stage, move the pointer over the button and click the button.
9.
Select Control > Enable Simple Buttons to deselect that feature.
Add navigation to a button
With behaviors, you can quickly add navigation to a button without having to know
ActionScript. You’ll add navigation to open a web page when the user clicks a button.
1.
On the Stage, select the instance of Button 1.
2.
In the Behaviors panel (Window > Development Panels > Behaviors), click the Add Behavior
button and select Web > Go to Web Page.
3.
In the Go to URL dialog box, select _blank in the Open In pop-up menu to open the URL in
a new browser window. In the URL text box, either accept the default setting of http://
www.macromedia.com or enter a different URL. Then click OK.
4.
If desired, repeat the steps above, selecting Button 2, then Button 3, to add navigation to those
buttons as well.
5.
Click the options menu control in the upper right of the Behavior panel, and select Close Panel
to close the panel.
Test the SWF file
You’ll test your document to view the button animation and see if the navigation works
as expected.
1.
Save your document and select Control > Test Movie.
2.
Roll the mouse pointer over the instance of Button 1 to view the color animation that
you created.
3.
Click the button to see if your web browser opens to the URL that you specified.
4.
If you added navigation to the other two buttons, test those buttons as well.
5.
When you finish viewing the SWF file, close the SWF file and web browser windows.
Summary of Contents for FLASH MX 2004-LEARNING FLASH
Page 1: ...Learning Flash...
Page 8: ...8 Contents...
Page 34: ...34 Chapter 3 Write Scripts with ActionScript...
Page 54: ...54 Chapter 6 Create a User Interface with Layout Tools...
Page 62: ...62 Chapter 7 Draw in Flash...
Page 68: ...68 Chapter 8 Create Symbols and Instances...
Page 76: ...76 Chapter 9 Add Animation and Navigation to Buttons...
Page 104: ...104 Chapter 13 Add Interactivity with ActionScript...
Page 112: ...112 Chapter 14 Create a Form with Conditional Logic and Send Data...
Page 122: ...122 Chapter 15 Work with Objects and Classes Using ActionScript 2 0...