006
Beginners Flash
Compatibility: MX For Flash
8:click here For Flash MX04:click here
Written
by: Phil Schulz
Length: 800
The
aim of the tutorial is to show you how to make a simple animated mask
in Flash.
Cross Ref: There is another tutorial explaining how to create a mask which is attached to the movement of the mouse. See: Beginner - Masks Attached to the Mouse
Create a new movie and Modify > Document size
and colour.
I set my movie size to: 550 x 170 Pixels and background to : White.
In the Timeline re-name Layer 1 to: Background
Create an image or text to go on the first Layer. You could
also import a photo. My Background Layer looks like this:
The dark gray background is drawn onto the stage then the text typed over
the top. If I did not paint a background you would not see the shape of the
gray
circle
but only the letters.
Note: The text must be set to Static text. If you are
not sure if your text is static select the text with your Arrow tool and
look at the settings in the Property Inspector (Windows > Properties). It
should say
Text set to Static.
Save the file. I called mine: animated-mask
For file names do not use spaces or any punctuation. You
may use letters, numbers, underscore _ and hyphen - only! You
can use capitals if you want, but they are a pain, so I never do.
Step two: Create a symbol to animate
Go to Insert > New Symbol
Name the symbol: circle
For Behavior select: Graphic
Click ok.
Draw a circle (or whatever). The colour of the circle makes
no difference.
Return to the main stage by clicking on the
tab on the top left of the stage.
Step three: Create the mask layer
Create a new Layer above your background layer.
Name the layer 'mask'.
Open your Library: Window > Library.
Drag the circle symbol into the new mask layer.
Step four: Create the animation
Align the circle to the left of the stage by opening your align
panel: Window > Align.
Click on the align to stage
button.
Click on the align vertical centre
button.
Click on the align left edge
button.
Your file should look like this.
Step five: Creating the animation
Right click (Mac: Command click) on frame 60 of the mask layer
and select Insert Keyframe.
Right click on frame 30 of the mask layer and select Create
Motion Tween.
Drag the circle from the left side of the stage to the right.
This will automatically place a keyframe in frame 30.
If need be use the Align panel to nudge the circle into place.
Note that the background has disappeared!
Step six: Adding frames to the background
Right click on frame 60 of the background layer and select
Insert Frame. Your background should re-appear.
Step seven: Creating the Mask
Right click on the frame label 'Mask' and select mask from
the menu.
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 it makes no difference. To make the mask appear again (at least
on stage) re-lock the layers.
Step eight: Test your Movie
Either: Go to Control > Test Movie. Or: Drag the red play head to see the animation move. Or: Press 'Enter' on the keyboard to see the animation play
on stage.