Chapter 6. Layering It On

In This Chapter

  • Creating layers

  • Modifying layers

  • Using guide layers

  • Creating holes with mask layers

Flash lets you organize objects on the Stage in layers. Layers keep objects separated from each other. Flash either combines or creates cutouts when two objects overlap if you don't use the object-drawing model (as we explain in Chapter 3). By placing the two objects on different layers, though, you avoid this behavior yet retain the appearance of overlapping objects. In addition, by rearranging your layers, you can easily rearrange the order of your objects — that is, which objects appear to be on top and which appear to be on the bottom.

Layers are also necessary for error-free animation. To move one object across the Stage in front of other objects, such as a background, you need to put the object on its own layer. If you want to animate several objects across the Stage, put each object on a separate layer.

You can hide layers. Flash doesn't display objects on hidden layers. Hidden layers are great for hiding some objects temporarily while you figure out what to do with all the rest of the stuff on the Stage.

Layering It On

Finally, you use layers as a storage place for sounds and ActionScript code. For example, you can name a layer Music and put your music there. Then you can easily find the music if you want to change it. Layers provide a great way to keep the various components ...

Get Flash® CS4 for Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.