Masking is a powerful tool in Flash.
This tutorial is an example of how to use masking for some cool animated effects.
The
first step is to plan out your project. In my case I wanted to create my own version
of 1984 with an x-ray telescope spying into the offices of a company. At the end
of this tutorial you will find the Flash Project file.
Step
1 The first step was building my graphics. I found clipart from my 'Corel
Gallery' CD set. The other components were the telescopic scope and a the mask.
Each graphic was converted into a 'Graphic Symbol.'
Step
2 This Project will consist of 6 layers. Select Frame 75 for all 6 layers
and press - F5 - key. This gives you a 75 frame animation. The top layer will
be a button 'Big Brother is Watching' I will add at the end of the tutorial. The
second layer is called 'Visible Scope.' This will be the scope that is visible
to the viewer. 'Masking Scope' is the graphic that will allow us to actually see
into the office. 'The Guys' is the graphic showing what the employees are really
doing inside the office. 'Office' is the exterior portion of the office, consisting
of the walls, windows and roof. 'The Guys Mask' is the same graphic as 'The Guys.'
Create 6 layers and give the layers
the names above - Click the layer to see the corresponding clip art.
Step 3 Select Frame 1 of the 'The Guys' layer.
Drag the 'The Office Guys' symbol onto the center of the page. This will be the
interior of the building. While this symbol is still selected, copy it. Now select
layer, 'The Guys Mask.' Now go - Edit - Paste in Place. This puts the copy in
the exact location as the original symbol.
The office guys hard at work
Step
4 Now you want to import the 'masking scope.' This will be your x-ray
machine. Select the 'Masking Scope' layer. Now drag the 'Masking Scope' symbol
and place it in the upper left of the window. Note the symbol's position by going
- Ctrl-Alt-I. This brings up the 'Object' window. Write down the x and y locations.
Now select frame 15, press F6 to set a keyframe and move the
'Masking Scope' so it is centered over the weight lifting guy. Write down the
location for future reference. Select frame 30, press F6, and move the scope over
the arm wrestling guys. Note this location. Select frame 45, press F6 and move
the scope over the bathtub guy. Note the location. Select frame 60, press F6,
and shift the scope over the sandwich eating guy. Note this location. Finally
select frame 75, press F6 and place the scope back to the starting position. Consult
your notes to enter the precise frame 1 location in the 'Object' window. Now select
each of these keyframes (1, 15, 30, 45 and 60), right click them and choose 'Create
Motion Tween.' Now when you scrub the 'Playhead' you see the 'Masking Scope' move
across the screen.
Path for 'Masking Scope' & 'Visible Scope' with keyframes.