# FMX Help with Snow Effect

**URL:** <https://forum.kirupa.com/t/fmx-help-with-snow-effect/72254>\
**Category:** flash\
**Created:** [December 3, 2004, 6:15pm UTC](https://forum.kirupa.com/t/fmx-help-with-snow-effect/72254 "2004-12-03T18:15:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kidkosmic](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@kidkosmic](https://forum.kirupa.com/u/kidkosmic)\
**Post date:** [December 3, 2004, 6:15pm UTC](https://forum.kirupa.com/t/fmx-help-with-snow-effect/72254/1 "2004-12-03T18:15:20Z")

</div>

I’m a super action script novice. I used the script in the tutorial at the address below to create a snow effect, but I can’t figure out how to make it stop!

[http://www.kirupa.com/developer/mx/snow.htm](http://www.kirupa.com/developer/mx/snow.htm)

Here’s the script I applied:

Copy and paste the following code into your Actions dialog box:

onClipEvent (load) {  
//specifies the size of the movie stage  
movieWidth = 300;  
movieHeight = 200;

//variables that will modify the falling snow  
i = 1+Math.random()\*2;  
k = -Math.PI+Math.random()\*Math.PI;

//giving each snowflake unique characteristics  
this.\_xscale = this.\_yscale=50+Math.random()\*100;  
this.\_alpha = 75+Math.random()\*100;  
this.\_x = -10+Math.random()\*movieWidth;  
this.\_y = -10+Math.random()\*movieHeight;  
}  
onClipEvent (enterFrame) {  
//putting it all together  
rad += (k/180)\*Math.PI;  
this.\_x -= Math.cos(rad);  
this.\_y += i;  
if (this.\_y\>=movieHeight) {  
this.\_y = -5;  
}  
if ((this.\_x\>=movieWidth) || (this.\_x\<=0)) {  
this.\_x = -10+Math.random()\*movieWidth;  
this.\_y = -5;  
}  
}

Copy and paste the following code into the Actions dialog box:

for (k=0; k\<50; k++) {  
duplicateMovieClip(this.snow, “snow”+k, k);  
}
