# How to make the snow stop?

**URL:** <https://forum.kirupa.com/t/how-to-make-the-snow-stop/10505>\
**Category:** flash\
**Created:** [January 2, 2003, 2:00pm UTC](https://forum.kirupa.com/t/how-to-make-the-snow-stop/10505 "2003-01-02T14:00:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![u\_silly\_78](https://avatars.discourse-cdn.com/v4/letter/u/cab0a1/32.png) [@u\_silly\_78](https://forum.kirupa.com/u/u_silly_78)\
**Post date:** [January 2, 2003, 2:00pm UTC](https://forum.kirupa.com/t/how-to-make-the-snow-stop/10505/1 "2003-01-02T14:00:20Z")

</div>

Hi, I had download a snow fla from this site. And i put at my moive. But when i want the snow to stop somewhere of the frame. ITs still keep going falling snow. Anyone know how to fix this problem?

The code as below

//  
// Snowfall algorithm by Grant Skinner. Check out [http://gskinner.com/](http://gskinner.com/) for updates, more source code and other good stuff.  
// To use:  
// copy this code into the timeline you wish to display snowflakes in.  
// copy the “snowflake” movieclip from this movie’s library into your movie’s library.  
// set the variables below.  
//  
// Edit these values:  
maxSnowFlakes = 60;  
snowFallWidth = 780;  
snowFallHeight = 400;  
windStrength = 50;  
// 0-100  
snowRate = 10;  
// 1-50 (smaller number is more flakes per second)  
// don’t touch anything below this line:  
function startSnowFall() {  
// set up the interval:  
snowIntervalID = setInterval(this, “doSnowfall”, 50);  
// initialize values:  
snowFlakeCount = windSpeed=windSpeedTarget=windAcc=nextWindChange=0  
;  
}  
function doSnowfall() {  
// wind calculations  
nextWindChange–;  
if (nextWindChange\<=0) {  
// change wind speed target  
nextWindChange = random(200)+50;  
windSpeedTarget = Math.round(random(windStrength)-windStrength/2)/5;  
}  
windAcc += (windSpeedTarget-windSpeed)/60;  
windAcc \*= 0.8;  
windSpeed += windAcc;  
if (snowFlakeCount // add a snowflake:  
snowFlakeCount++;  
this.attachMovie(“snowflake”, “s”+snowFlakeCount, snowFlakeCount);  
}  
}  
function endSnowFall() {  
for (var i = 1; i this[“s”+i].removeMovieClip();  
}  
clearInterval(snowIntervalID);  
}  
// END snowflake algorithm  
stopSnowFall();

---

<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:** [January 5, 2003, 1:15am UTC](https://forum.kirupa.com/t/how-to-make-the-snow-stop/10505/2 "2003-01-05T01:15:00Z")

</div>

i guess you can use endSnowFall(), right?

haven’t tested or read with any special attention the piece of code, but endSnowFall() should do its work.
