Macromedia Flash 8 for Windows & Macintosh

A little letter a in the Timeline indicates a keyframe that has actions attached (Figure 13.4). Can you imagine scrolling through dozensor hundredsof layers, looking for the letter a when you want to edit the actions in your document? That's a recipe for eyestrain. And more than that, it's a recipe for disaster if you (or someone else) need to change the ActionScript later; it's difficult to remember (or guess) where the frame actions are lurking. It's a good idea to put all your frame actions in their own layer.

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

Restricting frame actions to their own layer prevents you from accidentally putting actions in keyframes in two different layers for the same frame number, which can cause problems if you reorder the layers.

To create a separate layer for frame actions

1.

Open a Flash document.

2.

In the Timeline, add a new layer. (For detailed instructions on adding layers, see Chapter 6.)

3.

Rename the layer Actions.

4.

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 keyframes that contain actions when you need to modify or add to them (Figure 13.5).

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

Tip

  • To prevent yourself from adding graphic elements 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 keyframes.

Категории