Creating a dragable mask
In this tutorial you will learn how to create a mask in Flash. Uncover hidden text with your mouse pointer.
Step 1 : Create document and objects
- Open a new document (file → new → flash document) or from the flash main page click new document.
- Now click (Modify → Document) and change the dimensions like the screen shot below for better viewing.

- Also change the background color to a blue (or any color you chose) then click ok.
- Select the Rectangle Tool and draw a rectangle slightly bigger than the white stage.(Use a color different that your background color to see a difference.)

- Now click the text tool and type in any text you want like "Creating a Mask". This text is what will be hidden. The mask will allow you to see this text.
Step 2 : Layers and symbols
- Click the insert a layer button. Or go to Insert → Timeline → Layer

- Now click frame 1 of your new layer. This is very important that you click the correct frame. You want to add this layer becsaue the mask needs its own layer.
- Draw a circle anywhere on the new layer. This can also be any size. Look at the example below.
- Click on that circle you made with the black pointer (Selection Tool). Now go to Modify → Convert to Symbol. Or you can just click F8. Make sure you select the "Movie Clip" symbol. You can type in any name you want. Make sure the Registration black dot is in the middle. This is how your mouse pointer will move the symbol.

Step 3 : Creating & understanding the mask
- With the new symbol selected open your actions panel.
or click F9 on your keyboard.
- In the action script text box type in
onClipEvent (enterFrame) {
startDrag(this, true);
}

Understanding what this action script means
onClipEvent (enterFrame) {
This is the opening of our action script line that identifies the symbol & event of the mask.
startDrag(this, true);
Start to drag this object (the circle symbol). The true centers the object to the middle of the mouse.
}
This is the end event used to tell the script to stop..
- Right click on the layer 2 you made that has the circle on it and click "Mask".

Now look at the time line and the main screen... see the difference?

That's it. Now move your mouse pointer on the mask.
Copyright flashtrue.com