Imagine placing a sheet of red construction paper containing a cutout of a star over a piece of green construction paper. The result you see, when you look at the two sheets stacked on top of each other, is a green star on a red background.
That's the concept behind mask layers, a special type of layer that lets you create shaped "portholes" through which content in an underlying (masked) layer appears.
As you may have noticed, mask layers are horribly misnamed. In real life, masks hide stuff. In Flash, masks reveal stuff. Still, if you can keep the difference straight in your mind, they're easy to use. And when you apply a motion tween to the "porthole," you can create an effect that looks like a spotlight playing over an image—mighty cool, indeed.
Here's how you go about it:
Open the file mask_begin.fla.
You can download this file, a working example of the file (mask.fla), and all the other examples shown in this chapter from the "Missing CD" page at www.missingmanuals.com/cds.
Click Layer 1 to select it.
In the example file for this section (mask.fla), Layer 1 contains a bitmap image.
Click the Insert Layer button.
Flash creates a new layer named Layer 2 and places it above Layer 1.
Double-click the layer icon next to Layer 2.
The Layer Properties window appears.
In the Layer Properties window, turn on the checkbox next to Mask and then click OK.
Flash displays the mask icon next to Layer 2 (Figure 6-12).
Double-click the layer icon next to Layer ...