Website templates, flash templates, oscommerce skins, video loops, free stuff !

Creating a dragable mask

Posted by admin | Published 2006-07-20 | 55555

 

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

  1. Open a new document (file → new → flash document) or from the flash main page click new document.

  2. Now click (Modify → Document) and change the dimensions like the screen shot below for better viewing.



  3. Also change the background color to a blue (or any color you chose) then click ok.

  4. 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.)



  5. 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

  1. Click the insert a layer button. Or go to Insert → Timeline → Layer



  2. 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.

  3. Draw a circle anywhere on the new layer. This can also be any size. Look at the example below.



  4. 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

  1. With the new symbol selected open your actions panel.  or click F9 on your keyboard.

  2. 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..

  3. 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




Poor Excellent
Your Name:
Title:
Comment:
Verification code:
CAPTCHA



Nice
posted by Karthik on 2008-05-24
Hi Nice wook. . . .
 
 
 
Copyright © 2006 Flashtrue Layouts. All Rights Reserved.
Flashtrue Directory - Articles & Tutorials  | Web design News | Terms of use | FAQ
Flash video loops Website Templates Website Templates