:::Tutorials > Flash Spotlight with masking
Create an spotlight effect in Flash.
Tutorial by Ka Ming
Tuesday March 31, 2003
Download the source files from this tutorial: Download
(5kb)
The spot light effect you see here is consist of the use
of Layers, and Masking features of Flash.
What is that?
Masking is a special layer in Flash that creates a ‘hole’ through
which one or more layers grouped under it are visible. Mask
layers and the layers grouped under them can be treated in
the same way as any other layer, in the sense that you can
put whatever content you like on them, and manipulate that
content with tweens that you had learned from the previously
tutorial!
Let’s Practice how to Mask objects:
1
Create a new Flash movie with two layers,
Click the Added layer button in the bottom of the timeline
to add a new layer.
Just to bail anyone from confusion, we will name the top
layer mask and the bottom layer masked so that we won’t
mix them up.
2
Draw a square (in silver) on the mask layer
and a circle (in blue)on the masked layer
like this:
Tip: Lock the layers that
you are not currently working on. That way it would keep
the work much cleaner and separated
rather than mixing up objects and placing them in the wrong
layer.
3
Select the mask layer
and make it into a mask. (right click the layer
name, and click on mask)
Flash
MX or later
users, from this point you are finish, since the new version
of flash will automatically do the following process for
you! Move on to the spotlight effect below.
4
Now select the masked layer and right click the layer
name, then click on properties. Check the box that said Masked in the Type category.
5
The icons next to the layer names should
have changed to indicate that these layers are mask and
masked. But you
won’t be able to activate the masking feature until
you have locked all the masking layers, so click on the lock
sign to lock all layers.
Now for the real deal: Make the spotlight effect.
1
Create a new movie; adjust the background and the object
so that the object would stand out. Here, we had created
a text with a black background.
2
Name the layer with the text and background masked,
then create another layer and name it mask.
Be sure to move the layer mask to
the top in the layer list.
3
In the mask layer,
create a motion tween of an object. In this example, we
have created a circle that will move through
the text.
4
Let’s say we’ll end the circle
animation at frame 15,
drag both layers to frame
15, so
that all the
contents show up.
5
Finally, turn the mask layer
into mask (right
click>mask) and turn the masked layer
into masked (right
click> properties> check
masked box). Lock both layers, and you are all set!
6
Copyright 2002 BLUEPRINT Los Altos High School Web Club. All rights reserved.
201 Almond Ave. Los Altos, CA 94022