Masks

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Flash Tutorial - Animated Masks


 

Free Flash Tutorial

 

 

 

This tutorial shows you how to make a simple animated Mask in Flash. A Mask is an object which hides something. In Flash Masks are used with layers and they provide a simple way to selectively reveal portions of the Layer or Layers below. Masking requires making one Layer a Mask Layer and the Layers below it become only partly visible or masked.

 

In the example below the top Layer has a circle which has been animated. This is the Masked Layer and you can see through this circle to the Layer below:

My Example: Download the Flash file  Beg 006a


Flash Movie with an Animated Mask.

Click by Click: If you would like to view this tutorial without all the notes: Click by Click

 

Cross Ref: There is another tutorial explaining how to create a Mask which is attached to the movement of the Mouse. See: Masks Attached to the Mouse


Step One: Setting up the Document

  1. Open a New Flash Document: File > New (Ctrl N)
  2. If the General Tab is not selected, select it:
  3. Select Flash Document:
  4. Click: OK
  5. Note: You should now be able to see a new Flash document.

  6. Go to: Modify > Document (Ctrl J)
  7. Set the size. Mine is: 550 x 170px
  8. If you wish select a: Background colour. I set mine to: White
  9. Click: OK


Step Two: Creating the Text

  1. If the Timeline is closed, Open it: Window > Timeline (Ctrl Alt T)
  2. In the Timeline re-name Layer 1 to: Background

  3. Rename the Layer to Background.

  4. Select your Text Tool:
  5. Click on the Stage and type: Animated Mask (or whatever you want)

  6. My text.

    Note: As an alternative to typing you could do a drawing or even import a photo.

  7. Select the Selection Tool:

  8. If the Property Inspector is closed, open it: Window > Properties > Properties (Ctrl F3)
  9. If your text is not selected: Select the Text
  10. In the Property Inspector check that the text is: Static Text

  11. Selecting Static Text.

  12. Select a: Font, Colour or Style (ignore size)

  13. My Font settings:

  14. Select the Free Transform Tool:
  15. Drag the handles so that the text just fits the Stage: Enlarge Text


Step Three: Creating the Circle's Colour

The gray colour of the circle is actually a separate object to the actual circle! This is because the circle is actual a Mask and a Mask is a transparent shape.

  1. Select the Rectangle Tool:
  2. Note: Sometimes the Rectangle Tool hides under the PolyStar Tool:

  3. Draw a rectangle slightly bigger than the Stage: Draw a Rectangle
  4. Return to the Selection Tool:
  5. Click the fill of the rectangle: Highlight Rectangle Fill

  6. The rectangle's fill goes 'Dotty' when selected.

  7. Select a Fill Colour:
  8. I selected a gray: #666666

    Important: The colour of the rectangle fill must be different to the Movie's background colour!

    If a second background colour is not made you would not see the shape of the circle. Have a look at the Movie Again:

    My Example: Download the Flash file  Beg 006a


    The gray rectangle becomes masked by the circle.

  9. Save your file : File > Save (Ctrl S)


Step Four: Creating the Circle Symbol

The circle is animated using a standard Motion Tween. This means that you need to create a symbol to Tween.

    Cross Ref: See the tutorial: Motion Tweening

  1. In the Timeline lock the Background Layer:
  2. Create a new Layer by clicking on the Insert Layer Button:
  3. Name the Layer: Mask
  4. Select the Oval Tool:
  5. Drag out a large: Circle
  6. Tip: To constrain the Oval Tool to drawing exact circles hold down the Shift Key whist dragging.

  7. Select the Selection Tool:
  8. Select the circles: Stroke (outline)

  9. Circle's Stroke is highlighted.

    Note: The color of the circle does not matter as it will become a Mask which is a transparent shape.

  10. Delete the Stroke by pressing: Delete
  11. Select the: Circle


    The circle's now selected.

    Note: If the circle is not the correct size use the Free Transform Tool to change it's size. Don't forget to return to the Selection Tool:

  12. Go to: Modify > Convert to Symbol... (F8)
  13. Name the symbol: Circle
  14. For Behavior select: Graphic
  15. Click: OK

  16. New Circle Symbol.


Step Five: Animating the Circle

The circle starts it's animation on the left of Stage so the first thing to do is place it correctly:

  1. If the Align Panel is closed, open it: Window > Align (Ctrl K)
  2. In the Align Panel if the 'To Stage' option is off, turn it on:

  3. Align To Stage is On when the To Stage icon has a white background:

  4. With the circle selected click on: Align Vertical Centre
  5. Click on the button: Align Left Edge


    The circle is now to the left of the Stage.

  6. In the Timeline select: Frame 60

  7. Frame 60 is selected.

  8. Go to: Insert > Timeline > Keyframe (F6)

  9. There is now a copy of Frame 1 on Frame 60.

  10. Select: Frame 30
  11. Go to: Insert > Timeline > Create Motion Tween
  12. With Frame 30 selected go to: Insert > Timeline > Keyframe (F6)
  13. If the Align Panel is closed, open it: Window > Align (Ctrl K)
  14. Note: the Align to Stage button should still be selected:

  15. With the circle selected click on: Align Right Edge

  16. Save your file : File > Save (Ctrl S)
  17. Your Movie should look similar to this:

  18. If you wish you may want to test your Movie: Control > Test Movie (Ctrl Enter)

  19. Nearly there!

    Note: The gray background and text blinks and then disappears! That will soon be resolved.

  20. Close the Test Window:

  21. Unlock the Background Layer:

  22. In the Background Layer select: Frame 60

  23. Frame 60 of the background Layer is selected.

  24. Go to: Insert > Timeline > Frame (Ctrl F5)

    Note: Your background should re-appear.


Step Six: Creating the Mask

  1. In the Timeline right click (Mac: Ctrl click) on the Layer label 'Mask' select: Mask
  2. Note that when you create a Mask the Layers become automatically locked. The lock icon appears next to the Layer labels. If you wish to edit the Layers you will need to unlock the Layers by clicking on the lock icon . The Mask will appear to be gone, in actual fact if you test the Movie you will find that the status of the lock make s no difference in the final Movie. To make the Mask appear again (in edit mode) re-lock the Layers.


    See how the Layers are now locked and the Layer Symbols have now changed from: to:

  3. If you wish you may want to test your Movie: Control > Test Movie (Ctrl Enter)

  4. Close the Test Window:

    Here is an example of a Movie with multiple masks:

    My Example: Download the Flash file  Beg 006b


    Movie with multiple Masks

Have fun with your Masks. They are really easy to do! At least I hope they are now you have done this tutorial!

 

Please indicate what you thought of this tutorial 
10 is the best: 
10 9 8 7 6 5 4 3 2 1


Webwasp Community: Webwasp Mates & Dates

Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates

22735 visitors to this page since 14 Nov 06

 Top of Page Home Food Mates Members Tutorials Forum Buy Templates Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.