-- online Search!
Look, an author!

Creating Masks

by Jason Mayo   | filed under Flash and ActionScript

Archive

This is an archived tutorial about Flash. It's kept for history and may reference outdated tech.

TL;DR

A mask reveals parts of a layer below it. To make a static mask, put an image on one layer, add a layer above it set to Mask in Layer Properties, set the image layer to Masked, and draw a shape on the mask layer. Only the area under that shape shows through.

  • The shape's fill and outline colors don't matter, since anything outside the shape is blanked off.
  • Right-clicking the top layer and choosing Mask automatically makes the layer below it masked.
  • With more than two layers, only the mask layer and the one below it are masked, so other layers need to be set up too.
  • Using text on the mask layer puts the image inside the letters.

What is masking? Masking is a simple way to reveal parts of a layer below. This tutorial will take you through many types of masking from static masking where a image is shown through a non moving mask, animated masks where the mask moves to reveal bits of the image, and a special blurred edge mask.

Static Masks
The following is an example of how a static mask looks:

Here's how to create it:

  1. Open up flash and create a new flash document

  2. On the timeline there is a layer named "Layer 1", place an image on this layer. Ok now you need to create a new layer above layer 1.

  3. Once the new layer has been created, select it and goto Modify > Timeline > Layer properties and select 'Mask' as the type and press ok.

Image one

[ the layer properties dialog box ]

  1. Go back to the bottom layer (Layer 1) and goto Modify > Timeline > Layer properties and select 'Masked' as the layer type and press ok. Now you have two layers, the top layer is the 'Mask' where the actual masking will take place, and the bottom layer is the 'masked' layer where the image is.

Image two

[ select the option for masked ]

Lightbulb icon Tip
If you have two layers on your timeline, right click on the first layer and select Mask. You will find that the second layer automatically becomes masked. If you have more than two layers, only the layer that acts as the mask and the layer below it will be masked. You will need to repeat Step IV for masking other layers.
  1. Ok, now create a shape such as a rectangle or an oval on the 'Mask' layer (top layer) It doesn't matter what colour or what outline colour is given to the shape
    because the shape will be the part where the image below will show through; anything that is not the shape will be blanked off.

Overlapping turquoise circles along the bottom of a grass photograph

[ the shapes ]

  1.  Now test your mask by pressing Ctrl + Enter or by locking both layers.

     

Lightbulb icon Tip

A nice trick is to use text for the mask. To do this, create some text on the top layer and preview it. Now it should have the image inside the text.

There is a lot more you can do with masks, but this should give you a solid starting point for building both simple reveals and more stylized effects.

Before you go, here are a few things you can do:

  1. Ask a question

    Stuck on something, or curious about a detail we skipped? Ask on the forums, and we’ll help you out.

Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence, ads, and algorithm-driven doodads. A huge thank you to all of you who buy kirupa's books, became a paid subscriber, watch the videos, and/or interact on the forums.

Your support keeps this site going! 😇

- Jason Mayo

The KIRUPA Newsletter

Thought provoking content that lives at the intersection of design 🎨, development 🤖, and business 💰 - delivered weekly to over a bazillion subscribers!

SUBSCRIBE NOW

Creating engaging and entertaining content for designers and developers since 1998.

Follow:

Popular

Loose Ends

:: Copyright © KIRUPA 2026 //--