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