# Falling snow/coin with a stop

**URL:** <https://forum.kirupa.com/t/falling-snow-coin-with-a-stop/306902>\
**Category:** Uncategorized\
**Created:** [March 24, 2010, 9:02am UTC](https://forum.kirupa.com/t/falling-snow-coin-with-a-stop/306902 "2010-03-24T09:02:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahalo74](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@mahalo74](https://forum.kirupa.com/u/mahalo74)\
**Post date:** [March 24, 2010, 9:02am UTC](https://forum.kirupa.com/t/falling-snow-coin-with-a-stop/306902/1 "2010-03-24T09:02:37Z")

</div>

I’m using this falling snoweffect but I exhanged the snow with a coin so what I wanna do is have money falling but when they reach bottom I want them to stop. Instead they are looping and I dont know where to change it in the code.  
Can anyone help me with this.

init = function () {  
width = 200;  
// pixels  
height = 400;  
// pixels  
max\_snowsize = 10;  
// pixels  
snowflakes = 5;  
// quantity  
for (i=0; i\<snowflakes; i++) {  
t = attachMovie(“snow”, “snow”+i, i);  
t.\_x = -(width/2)+Math.random()_(1.5_width);  
t.\_y = -(height/2)+Math.random()_(1.5_height);  
t.k = 1+Math.random()_4;  
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();
