Skip to Main Content
Flash CS3: The Missing Manual
book

Flash CS3: The Missing Manual

by E. A. Vander Veer, Chris Grover
May 2007
Beginner content levelBeginner
530 pages
16h 16m
English
O'Reilly Media, Inc.
Content preview from Flash CS3: The Missing Manual

Adding an Action

For an action to work, you must attach it to something in your animation. You add an action to either an object (like a component or symbol) or a frame, depending on when you want Flash to perform the action.

In this section, you see an example of adding an action to an instance of a button symbol (Button Symbols), but the technique's the same no matter where you're putting the action. Just remember to select the object on the Stage—or a frame in the Timeline—and then create the action.

Note

Chapter 10 describes the differences between frame-and object-based actions and when you want to choose one over the other.

To add an action:

  1. Open the document hotspot_drag_begin.fla.

    You can download this example file from the "Missing CD" page at www.missingmanuals.com/cds. It has a drawing all ready for you to practice on. (For a working copy, download hotspot_drag.fla.)

  2. Choose Window → Properties → Properties to display the Property Inspector. On the Stage, click Smiley's left eye (see Figure 9-4).

    Flash highlights the instance of the leftEye button symbol and displays instance-related properties in the Properties tab of the Property Inspector.

    Because many ActionScript statements require you to refer to a symbol instance by name, you want to get in the habit of always typing in a short, meaningful instance name every time you drag an instance to the Stage. You may not need it, but if you do, it's there. And even if you don't end up referencing the instance name in ActionScript, it comes in handy as a reminder of which object you're tying your action to (see ).

    Figure 9-4. Because many ActionScript statements require you to refer to a symbol instance by name, you want to get in the habit of always typing in a short, meaningful instance name every time you drag an instance to the Stage. You may not ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flash CS5: The Missing Manual

Flash CS5: The Missing Manual

Chris Grover
FileMaker Pro 10: The Missing Manual

FileMaker Pro 10: The Missing Manual

Susan Prosser, Geoff Coffey

Publisher Resources

ISBN: 9780596510442Supplemental ContentErrata Page