O'Reilly logo

Flash 8: The Missing Manual by E. A. Vander Veer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Viewing Layers

This section shows you how to use Flash's layer tools (including locking/unlocking and hiding/showing) to keep from going crazy when you're editing content in multiple layers. (Two layers isn't so bad, but if you need to add six, eight, 10, or even more layers, you'll find it's pretty easy to lose track of which layer you're working in.) Then, in the following section, you see how to edit the content in your layers.

Showing and Hiding Layers

Whether or not you want Flash to show the contents of your layered frames on the Stage depends on the situation. Typically, when you're creating the content for a new layer, you want to hide all the other layers so that you can focus on what you're drawing without any distractions. But after you've created a bunch of layers, you're probably going to want to see them all at once so that you have an idea of what your finished animation looks like and make adjustments as necessary.

Flash shows all layers until you tell it otherwise.

Top: Creating separate layers for different graphic elements gives you more control over how each element appears in your finished animation.Bottom: In this example, the images are static, but you can place everything from motion and shape tweens to movie clips, backgrounds, actions, and sounds on their own layers. Hiding layers affects only what you see on the Stage; when you select Control → Test Movie to test your animation, Flash displays all layers, whether or not you've checked them as Hidden.

Figure 4-7. Top: Creating separate layers for different graphic elements gives you more control over how each element appears in your finished animation. Bottom: In this example, the images are static, but you can place everything from motion and shape tweens to movie clips, backgrounds, actions, and sounds on their own layers. Hiding layers affects only what you see on the Stage; when you select Control → Test Movie to test your animation, Flash displays all layers, whether or not you've checked them as Hidden.

Tip

You can tell Flash to show (or hide) all your layers by clicking the Show/Hide All Layers icon you see in Figure 4-6. Click the icon again to turn off showing (or hiding).

To hide a layer

On the Timeline, click the dot (the Show/Hide) icon next to the layer you want to hide (Figure 4-9, top). When you do, Flash redisplays the dot as an X and temporarily hides the contents of the layer (Figure 4-9, bottom).

To show a layer

On the Timeline, click the X (the Show/Hide icon) next to the layer you want to show (Figure 4-9, bottom). When you do, Flash redisplays the X as a dot and displays the contents of the layer on the Stage (Figure 4-9, top).

Here's what the composite drawing for Frame 1 looks like: the fence, the flowers, the cloud, and the birds, all together on one Stage. Notice the display order: The flowers (Layer 2) appear in front of the fence (Layer 1), and the birds (Layer 4) in front of the cloud (Layer 3). Flash automatically displays the layer at the bottom of the list first (Layer 1), followed by the next layer up (Layer 2), followed by the next layer (Layer 3), and so on. But you can change this stacking order, as you see on Section 4.4.3.

Figure 4-8. Here's what the composite drawing for Frame 1 looks like: the fence, the flowers, the cloud, and the birds, all together on one Stage. Notice the display order: The flowers (Layer 2) appear in front of the fence (Layer 1), and the birds (Layer 4) in front of the cloud (Layer 3). Flash automatically displays the layer at the bottom of the list first (Layer 1), followed by the next layer up (Layer 2), followed by the next layer (Layer 3), and so on. But you can change this stacking order, as you see on Section 4.4.3.

To hide (or show) all layers except the one you're currently editing

On the Timeline, Alt-click (Windows) or Option-click (Mac) the Show/Hide icon next to the layer you're editing. Flash immediately hides (or shows) all the layers except the one you're editing.

Note

If you try to edit a hidden layer by drawing on the Stage, Flash displays a warning dialog box that gives you the opportunity to show (and then edit) the layer. Not so if you try to drag a symbol to the Stage—Flash just refuses to let you drop the symbol on the Stage. Oddly enough, however, Flash does let you add a keyframe to a locked layer.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required