Flash Script – Falling Snow Effect

By Georgina Laidlaw

Download the sample files here.

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);
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)
setProperty("snow" add i,_x,random(450))
setProperty("snow" add i,_xscale,scale)
setProperty("snow" add i,_yscale,scale)

9. Insert this action into the second key frame:

gotoAndPlay (2);

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

  • Jay Svoboda

    how do you add a clickTAG action to this snow effect? Can i add it to the existing auto script? or do i need to create a new button / layer and add the action to that?



Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Instant Website Review

Use Woorank to analyze and optimize your website to improve your website to improve your ranking!

Run a review to see how your site can improve across 70+ metrics!

Get the latest in Front-end, once a week, for free.