Flash Script – Falling Snow Effect

December 12, 2010

How To

1. Create a small snowflake I used a small circle filled with white color.

2. Convert this snowflake object to a movie clip, and give it an instance name of “snow”.

3. Now, go in to the time line of this snow movie clip, and create three keyframes in this layer.

4. In the first key frame give action:

mov = 0;

ran = getProperty(“”, _x);

5. In the second key frame give action:

setProperty ("", _y, mov=mov+2);
snowy = getProperty("", _y);
setProperty ("", _x, (ran+random(2)));
if(snowy > 310)
{
setProperty ("", _y, 50);
mov=0;
ran = ran - 10;
}

6. In the third key frame give action:

gotoAndPlay (2);

7. Now go back to the main timeline, and create two key frames in this layer.

8. Insert these actions into the first key frame:

if (snowparticles<150)
{
duplicateMovieClip("snow","snow" add i,i)
scale=random(60)+10
setProperty("snow" add i,_x,random(450))
setProperty("snow" add i,_xscale,scale)
setProperty("snow" add i,_yscale,scale)
snowparticles++
i++
}

9. Insert this action into the second key frame:

gotoAndPlay (2);

That’s it! You have created your own snow effect.

, , ,

3 Responses to “Flash Script – Falling Snow Effect”

  1. ann Says:

    this is not wrkng in flash cs4

  2. badly Says:

    :) i`t worked for me here…

  3. portable wardrobe closets heavy duty steel tubing Says:

    Excellent blog! Do you have any tips and hints for aspiring writers? I’m planning to start my own blog soon but I’m a little lost on everything. Would you recommend starting with a free platform like WordPress or go for a paid option? There are so many options out there that I’m completely overwhelmed .. Any suggestions? Thanks a lot!

Leave a Reply