Using Masks in Flash

Objectives:

  • Using a Mask to Make a Spotlight Effect

    Adapted from the book: Foundation Flash 5 by Bhangal, Farr, and Rey.

Using a Mask to Make a Spotlight Effect


Take a look at this example of a spotlight effect. The way I did this was I created a collage in Photoshop using the rubber stamp tool. You've done this before in earlier exercises. It involves opening a series of images and then rubber stamping the parts you want into a new image to create the collage.

This became my background layer. Next, I added a mask layer consisting of a single oval shape (my spotlight). I converted it into a symbol, added frames and keyframes to both layers and then applied a simple motion tween to the spotlight so that it would move over the different faces in the collage.

Finally, I modified the mask layer to change it to to a mask, and modified the background layer to be masked. I locked the layers and there you go.

  1. Open PhotoShop and create a collage using the rubber stamp tool.

  2. Start a new Flash movie. Name the first layer background.Import your PhotoShop collage.

  3. Add a new layer. Name it mask

  4. Draw an oval to represent your spotlight.

  5. Convert the oval to a graphic symbol.

  6. Insert keyframes in frame 30 for both layers.

  7. Apply a motion tween to both layers.

  8. Insert additional keyframes scattered throughout the mask layer so that you can simulate the movement of the spotlight.

  9. Select the mask layer. Click on Modify > Layer > and click the mask button.

  10. Select the background layer. Click on Modify > Layer > and this time click the masked button.

  11. Change the background of the movie to black. Click on Modify > Movie > Background Color > and choose black.

  12. Lock both your layers.

  13. Test your movie.

<< Back to Skyline