Section 4.3. Viewing Layers


4.3. 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.

4.3.1. 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 .

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 youve 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).
4.3.1.1. 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).

4.3.1.2. 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).

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.

GEM IN THE ROUGH
Distribute to Layers

If you have a bunch of graphic elements on one layer that you want to put on separate layers (because, for example, you want to be able to tween them all), you can save time by telling Flash to do the work for you. First, select the objects you want to put on different layers and then select Modify Timeline Distribute to Layers.

Unfortunately, like any automatic process, this approach may not create the precise results you want. Flash can't possibly know that you want both an eye and an eyebrow to go on the same layer, for example. And this trick doesn't break apart bitmaps, symbols, or grouped objects.

If you want to distribute the elements of a bitmap or symbol to individual frames, you first need to break up that bitmap, symbol, or grouped object by selecting it and then choosing Modify Break Apart or Modify Ungroup, respectively.


4.3.1.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 StageFlash 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.
UP TO SPEED
Why Layer?

In addition to making it much, much easier for you to change your animations, working with layers gives you the following benefits:

You can create multi-tweened animations . Flash lets you create only one tween (Chapter 3) per layer. So if you want to show two baseballs bonking a parked carone ball sailing in from the right, and one from the leftyou need to either draw the entire animated sequence for each ball by hand, or use two separate layers, each containing one tween.

You can create more realistic effects . Since you can shuffle layers, putting some layers behind others and even adjusting the transparency of some layers, you can add depth and perspective to your drawings. And because you can distribute your drawings to layers at whatever level of detail you want, you can create separate layers that give you independent control over, say, your characters ' facial expressions and arm and leg movements.

You can split up the work . TV and movie animators use layers (technically, they use transparent sheets of plastic called cels , but it's the same concept) to divvy up their workload, and so can you. While you're crafting the dog layer, one of your teammates can be working on the cloud layer, and another two can be working on the two character layers. When you're all finished, all you need to do is copy everyone's layers and paste them onto a single Timeline, and bingoinstant animation.

You can organize your animations . As you begin to create more sophisticated animations that may include not just images and animated effects, but symbols (Chapter 7), sounds (Chapter 8), and actions (Chapter 9), you quickly realize you need to organize your work. Layers help you get organized. If you get into the habit of putting all your animation's actions into a single layer (called actions ), all the sounds into a single layer (called sounds or soundtrack ), all the text into a single layer (called text ), and so on, you can quickly spot the element you're looking for when it comes time to edit your animation.