| The snowing effect we
are going to discuss here is similar to the effect being
used in Our Flash
Form and Flash
Menu. A bit of actionscripts are required for the
effect.
Step 1
First of all, you need to create the snow
object.
On your main stage, draw a few strokes
so that it look like the following (acutally, you can
draw whatever shape you like):

Then convert it into a picture symbol
(and name it as "obj").
Step 2
While you are still at the main stage
(with the "obj" on your stage), select the
picture and convert it to a movie clip (name it as "ani_clip").
Open the "ani_clip" symbol for editting (you
should see the "obj" picture in the first
frame). Insert a key frame at frame 15. Select frame
1 and move the "obj" picture up a bit. Then
select frame 15 and move the "obj" picture
down a bit. Tween the animation from frame 1 to frame
15, so it looks like the snow object is falling. (add
acceleration and roation if you like). Then move frame
1 to frame 2 (such that frame 1 is empty afterwards).
Insert 1 blank frame at frame 1. The final time line
shoul look like the lower layer as shown in the figure
below:

Step 3
Now, you need to insert a new layer to
the time line. In the first frame of the new layer,
insert the following actionscript:
function start_play(clip)
{
rectw = 550; // size of the main stage
recth = 400;
// rand size and position
xpos = random(rectw-20) + 10;
ypos = random(recth-20) + 10;
xyscale = random(25) + 25;
setProperty(clip, _x, xpos);
setProperty(clip, _y, ypos);
setProperty(clip, _xscale, xyscale);
setProperty(clip, _yscale, xyscale);
clip.gotoAndPlay(3);
}
// random delay
threshold = 25;
num = random(30);
if(num > threshold) {
start_play(this);
} |
Convert the second frame to a key frame
and put the following actionscaipts to it:
Ok, the "ani_clip" is done.
Lets move back to the main stage.
Step 4
On the main stage, first select the the
"ani_clip" and give it an instance name "ani_clip".
Then select frame 1, and add the following actionscript
to it:
for(i=1; i<30; i++) {
duplicateMovieClip("ani_clip", "ani_clip"
+ i, i);
} |
Test your movie....That's it! Easy?
(You may want to set the alpha of the
"obj" picture in the "ani_clip"
to make some fade-in / fade-out effect)
< Tutorials
Index - Download
this tutorial - Post
suggestions >
|