Creating a Spotlight

 

Masking is an important concept in Flash and other programs as well. The fun thing about masks in Flash is that they can be dynamic. In this exercise you will create a new cursor object and then turn it into a mask.

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

 

Turn your cursor into a flash object
1. Create a new Flash File but be sure you select the second option, (ActionScript 2.0). Make sure you do NOT select the first option which is the default of ActionScript 3.0) Save this file as Spotlight - Your Name.
2. Create a new layer called cursor and create a circle with no stroke and make the fill white. Make the circle 100 pixels in diameter.
3. Convert the circle to a movie clip and give it an instance name of cursor.
4. Create a new layer called actions. Click in the first frame of this layer and press F9 to open the actions panel.
5. Type in the following commands:
Mouse.hide();
cursor.startDrag(true);
6. Save your file and test the movie. When your cursor gets over the flash stage it should turn into a white circle that you can now drag around.
7. Return to the flash file and select Modify > Document and change the frames per second to 30. This will make the cursor action much smoother.

For an object to be controlled by an action script it must have an instance name.

Creating a Normal and Faded Image
1. Open an image in fireworks. Change the image size so that it will fit your flash stage size.
2. Save the image as Normal. Save the image again as Faded.
3. While in the faded image go to Filters > Brightness/Contrast. Reduce both the brightness and contrast until the image looks faded. Save the file and exit Fireworks.

Importing your images onto the stage.
1. Go to File > Import > To Library and import your faded and normal images.
2. Create a new layer called Normal Image and drag an instance of your normal picture onto the stage. Align it to the stage.
3. Create another layer called Faded Image and drag an instance of the faded image onto the stage. Align it to the stage.
4. Move the faded image layer to the bottom of the layers list with the Normal Image layer above it.

Turning your Cursor (the white circle) into a Mask
1. Drag your cursor layer so it is directly above the Normal Image layer. Right click on this layer and select Mask.
2. Save your file and test the movie.