A mask allows you to hide objects in Flash. Making a mask does not require any ActionScript. A mask may be stationary, with objects moving under it, or it may be moving.
You need to upgrade your Flash player (v.9 or later) to view this tutorial.
You need to upgrade your Flash player (v.9 or later) to view this tutorial.
There is a very good illustrated tutorial for learning to use masks in Flash CS4: Using Masks, by Greg Bowden.
Note that a mask (moving or not) can have any shape, even the shape of a letter of the alphabet. A moving mask may change size and can be controlled with buttons.
Above is the Timeline of the simple mask: The mask does not move, and the playing card does. Below is the Timeline of the other example, in which the mask itself moves. The playing card stays in one place.
The mask shape must be on its own layer, alone, above the objects to be masked. To make the mask operational, right-click (Control-click/Mac) the layer name, and select "Mask" from the pop-up menu. It's as easy as that!
Only layers that are indented under the mask layer will be subject to the mask effects. You can drag a layer into place below the mask layer in such a way that it is indented, or not.
DOWNLOAD The downloads for this example are in this folder. The one on the left above is playingcard_example.fla and the other (with a moving mask) is playingcard_example2.fla.
Education use: This package was created as an example for my journalism students. It is not intended to be used commercially.
Use and re-use:
Understanding Masks in Flash CS4 by Mindy McAdams is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Updated 3 March 2011