# Removing this effect

**URL:** <https://forum.kirupa.com/t/removing-this-effect/330437>\
**Category:** flash\
**Created:** [January 21, 2013, 4:33pm UTC](https://forum.kirupa.com/t/removing-this-effect/330437 "2013-01-21T16:33:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casey\_Kloss](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@Casey\_Kloss](https://forum.kirupa.com/u/Casey_Kloss)\
**Post date:** [January 21, 2013, 4:33pm UTC](https://forum.kirupa.com/t/removing-this-effect/330437/1 "2013-01-21T16:33:32Z")

</div>

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

So, I incorporated the effect shown in this tutorial into a project thing I’m working on. It’s working fine but I’ve noticed that it plays on all of my frames. I only want it on the one frame. Is there possibly an additional line(s) of code I can add to make it only appear on the one frame? I’ve tried to go to the other frames and add a removeMovieClip() but it didn’t work. I’m not new to Flash persay, but I haven’t used it in about 3 years, so my previous skills have regressed as well as general know-how. I’m just slowly picking back up on the basics, and intermediate things. To be honest, coding wasn’t ever really my strong suit. So, if there’s a better way I could be going about this, please let me know.

Code on the movie clip:  
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;  
}  
}

Code on the first frame:  
for (k=0; k\<50; k++) {  
duplicateMovieClip(this.snow, “snow”+k, k);  
}
