Specifications

235
20
CHAPTER 20
ActionScript: Add
Interactivity
Macromedia Flash Basic 8 and Macromedia Flash Professional 8 offer
numerous ways to engage users with interactivity. When you incorporate
interactivity, youre not limited to playing each frame in a timeline
sequentially; however, sequential playing offers greater design and
development options. This tutorial will show you some of the ways to
implement interactivity in Flash.
You can print this tutorial by downloading a PDF version of it from the
Macromedia Flash Documentation page at www.macromedia.com/go/
fl_documentation.
In this tutorial, you will complete the following tasks:
Set up your workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Name button instances. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237
Add a scene. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237
Move between scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Control the document with a stop() action . . . . . . . . . . . . . . . . . . 238
Link a button to a scene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Add navigation to return to Scene 1 . . . . . . . . . . . . . . . . . . . . . . . . 239
Play a movie clip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Use a behavior to play an MP3 file. . . . . . . . . . . . . . . . . . . . . . . . . 243
Test your document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
NOTE
If you have Flash Professional 8, you can use screens to create a
document. Screens provide additional navigation options. Slide screens,
for example, already include built-in navigation that allows users to use
keyboard arrow keys to move through screens. For more information
about screens, select Help > Flash Tutorials > Basic Tasks: Create a
Presentation with Screens (Flash Professional Only).