Recipe 3.8. Managing Content with LayersProblemYou need to manage two elements independently of one another. SolutionPlace the elements in separate layers. Manage layers with layer folders. DiscussionLayers are a common feature of graphics software that are generally used to control the stacking order of elements as well as facilitating asset management within files. Elements stored in layers higher in the stack will block elements in layers lower in the stack when there is overlap. By storing different elements in their own descriptively named layers, you can more readily manage the artwork by deleting, hiding, outlining, locking, and otherwise working with layer content independently of other layers. Although layers are used in Flash for both of these purposes, layers have additional significance:
The second point is the more significant of the two. All the contents of a layer are tied to its keyframes and frames. Certain types of content, such as Flash's automated forms of animation, tweens, affect entire layers. If you want to animate two elements independently of one another, such as the eyes and mouth of a cartoon character, you must put these elements on different layers. In such an example, the eyes might blink every 45 frames, while the mouth is constantly animated, requiring keyframes every few frames. Layers are a feature of .fla files and authoring in Flash. When you export a Flash movie in the .swf file format, Flash flattens all the layers to minimize file size. Thus, layers are primarily an authoring aid. Layer maintenance is performed in the layer stack just to the left of the timeline, as well as in the small toolbar just beneath it:
Layers are not part of the movie's contents; remember, layers aren't even exported with the .swf file. A movie's contentsart, sounds, text, scripts, and moreare stored in layers and frames, much like clothes are stored in closets and drawers. Maintaining layers and maintaining movie contents are thus two different activities. These two activities come together inasmuch as content resides in a given keyframe of a given layer.
In addition to the standard layers with their keyframes and regular frames discussed thus far in this chapter, Flash has a handful of specialized types of layers. These specialized layers are discussed in appropriate places in this book, but they are summarized here for quick reference:
Layers are used, for one thing, to control the stacking order of overlapping elements. However, elements within a given layer also have a stacking order. In most cases, elements added more recently are stacked above elements added earlier. However, this is not universal. Vector art drawn in Flash always appears behind bitmap graphics in the same layer, regardless of the order in which they were added. There is no way to stack vector art above bitmap graphics without placing the art in a higher layer. Text, in contrast, can be stacked above bitmap graphics and art within a layer. You can control the stacking order of elements within a layer, with the exception of vector artwork and bitmap graphics, using the commands in the Modify Arrange menu:
Although these options are available, it is generally better practice to avoid stacking multiple elements within layers, and instead to put elements in their own layers, especially when the elements are of different types (for example, bitmaps and vector art). |
Tripod >> 3pod Tips & Learning and manuals for educations