Flash Script - Falling Snow Effect

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);  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.


Category: software Time: 2003-04-28 Views: 1

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.180 (s). 12 q(s)