# Stop the snow

**URL:** <https://forum.kirupa.com/t/stop-the-snow/38236>\
**Category:** flash\
**Created:** [December 19, 2003, 8:14pm UTC](https://forum.kirupa.com/t/stop-the-snow/38236 "2003-12-19T20:14:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![d9085](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@d9085](https://forum.kirupa.com/u/d9085)\
**Post date:** [December 19, 2003, 8:14pm UTC](https://forum.kirupa.com/t/stop-the-snow/38236/1 "2003-12-19T20:14:54Z")

</div>

Hello…  
I have followed directions on how to make snow fall.

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

## I used the oval tool to make a round snow drop. Converted it into a movie and named it “winter”. In the movie clip instance the name is “snow”. I right ckicked the snow drop and clicked Actions. Entered this:

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; } }

ON THE 11th LEVEL OF FRAME 1, I ENTERED THIS A/S:

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

It’s works fine! But…  
**I only want it to snow for 75 of the 400 frames I have.**

I tried using the removeMovieClip (“winter”); on level 11 frame 75  
but it doesn’t work.  
What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2003, 5:26pm UTC](https://forum.kirupa.com/t/stop-the-snow/38236/2 "2003-12-21T17:26:24Z")

</div>

Big thanks to ALW.

For those of you that may have wondered the same thing I was, here is the answer:

for (x=0; x\<50; x++) {  
removeMovieClip(“snow”+x);  
}  
setProperty("\_root.snow", \_visible, false);

The code simply removes all the duplicated snowflakes (using pretty much  
the exact code it used to create them) and then the “setProperty” hides the MC.

To use it again on some other frame just place the MC on the stage at that frame and make the “setProperty” true.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 1:47pm UTC](https://forum.kirupa.com/t/stop-the-snow/38236/3 "2003-12-29T13:47:51Z")

</div>

can i add this snow animation to a background i have already created…? …but i want to preserver my original art work!?  
can it be done…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 11:49pm UTC](https://forum.kirupa.com/t/stop-the-snow/38236/4 "2003-12-29T23:49:41Z")

</div>

You can run the snow from any layer you want. In the first frames of my MC I have the snow in front of everything. Later on, you can see it snow through a window.  
Hope this helps.  
[http://www.kirupa.com/developer/mx/snow.htm](http://www.kirupa.com/developer/mx/snow.htm)
