Organizing Actions

I l @ ve RuBoard

Flash identifies each keyframe that has attached actions by putting a little letter a in that keyframe in the Timeline (Figure 12.6). But can you imagine scrolling through dozensor hundredsof layers, looking for little letter a's when you want to edit a movie's actions? That's a recipe for eyestrain. Create a layer just for actions so that you'll know exactly where the actions are at any point in the Timeline. Also, with a separate layer for actions, you won't accidentally as ign actions to two different layers at the same point in the Timeline, which could cause problems if you reorder the layers at some point.

Figure 12.6. Keyframes that contain actions display the letter a in the Timeline.

graphics/12fig06.gif

To create a separate layer for actions:

  1. In the Timeline, add a new layer.

    (For detailed instructions on adding layers, see Chapter 5.)

  2. Rename the layer Actions.

  3. Drag the layer to the top or bottom of the Timeline.

    With a separate Actions layer as the top or bottom layer, you'll always know where to find the frames that contain actions when you need to modify or add to them (Figure 12.7).

    Figure 12.7. When you assign actions to many layers (top), it's harder to find them, and you might accidentally assign actions to the same frame number on different layers. Adding a separate layer just for actions (bottom) makes it easy to find them all and to see whether a certain frame does contain an action.

    graphics/12fig07.gif

graphics/01icon02.gif Tip

  • To prevent yourself from adding any graphics to the Actions layer accidentally, lock it (by clicking the bullet in the padlock column). Locking keeps you from making changes in the elements on the Stage for that layer, but it doesn't prevent you from adding actions to frames.


The Pitfall of Placing Actions on Multiple Layers

At each point in the Timeline, Flash implements the actions in the highest-level frame that contains an action. Imagine a three-layer movie. Frame 2 of the top layer contains no actions. In Frame 2 of the middle layer, an action tells Flash to skip to Frame 5. In Frame 2 of the bottom layer, an action tells Flash to skip to Frame 10. When you play this movie, and the playhead hits Frame 2, Flash looks in the top layer for actions and finds none. Flash moves to the next layer down. There, it finds an instruction and follows it. Flash whisks you away to Frame 5; it never has a chance to get to the instruction in the bottom layer. But if you reorder the layers so that the bottom layer is on top, Flash whisks you to Frame 10 instead of Frame 5! This situation could cause havoc with your movie.

I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net