# Help with snowflakes!

**URL:** <https://forum.kirupa.com/t/help-with-snowflakes/215290>\
**Category:** Uncategorized\
**Created:** [February 6, 2007, 2:22am UTC](https://forum.kirupa.com/t/help-with-snowflakes/215290 "2007-02-06T02:22:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmi109](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gmi109](https://forum.kirupa.com/u/gmi109)\
**Post date:** [February 6, 2007, 2:22am UTC](https://forum.kirupa.com/t/help-with-snowflakes/215290/1 "2007-02-06T02:22:55Z")

</div>

[SIZE=3]I am working on a flash project for school with a skiing scene in it. I used the snow 3.o tutorial to make a wonderful snow scene. I am using multiple scenes and not all of them need the snow. My problem is I can’t get all of the snow to disappear when I leave the snow scene. I used the following commands. I admit to not knowing but a few commands, so I probably just don’t know the one to get rid of the snow.[/SIZE]  
init = function () {  
width = 550;  
// pixels  
height = 400;  
// pixels  
max\_snowsize = 10;  
// pixels  
snowflakes = 70;  
// quantity  
for (i=0; i\<snowflakes; i++) {  
t = attachMovie(“snow”, “snow”+i, i);  
t.\_alpha = 20+Math.random()_60;  
t.\_x = -(width/2)+Math.random()_(1.5_width);  
t.\_y = -(height/2)+Math.random()_(1.5_height);  
t.\_xscale = t.\_yscale=50+Math.random()_(max\_snowsize_10);  
t.k = 1+Math.random()2;  
t.wind = -1.5+Math.random()(1.4_3);  
t.onEnterFrame = mover;  
}  
};  
mover = function() {  
this.\_y += this.k;  
this.\_x += this.wind;  
if (this.\_y\>height+10) {  
this.\_y = -20;  
}  
if (this.\_x\>width+20) {  
this.\_x = -(width/2)+Math.random()_(1.5_width);  
this.\_y = -20;  
} else if (this.\_x\<-20) {  
this.\_x = -(width/2)+Math.random()_(1.5_width);  
this.\_y = -20;  
}  
}  
init();  
[SIZE=3]I used that to make the snow and it works fine. Then I used,[/SIZE]  
for (k=70; k\>0; k–) {  
removeMovieClip(“snow”);  
removeMovieClip(“snow”+k);  
removeMovieClip(k);  
}  
[SIZE=3]to remove the snow. It works, but it leaves one tiny snowflake behind. I’ve put variations of the top script to make it so that the single snowflake only shows up sometimes in the top corner, but I want it gone![/SIZE]
