# How to change the speed in the snow tut \[renamed\]

**URL:** <https://forum.kirupa.com/t/how-to-change-the-speed-in-the-snow-tut-renamed/184914>\
**Category:** flash\
**Created:** [April 9, 2006, 4:01am UTC](https://forum.kirupa.com/t/how-to-change-the-speed-in-the-snow-tut-renamed/184914 "2006-04-09T04:01:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alchemee](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@Alchemee](https://forum.kirupa.com/u/Alchemee)\
**Post date:** [April 9, 2006, 4:01am UTC](https://forum.kirupa.com/t/how-to-change-the-speed-in-the-snow-tut-renamed/184914/1 "2006-04-09T04:01:02Z")

</div>

Which part of this code do I change to make the speed of the ‘snowflakes’ faster? (from falling snow 0.3 tut):

init = function () { width = 800;height = 500;max\_snowsize = 5;snowflakes = 350;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.fall;if (this.\_y\>height+20) {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();

---

<div class="post-metadata">

**Author:** ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)\
**Post date:** [April 9, 2006, 6:48am UTC](https://forum.kirupa.com/t/how-to-change-the-speed-in-the-snow-tut-renamed/184914/2 "2006-04-09T06:48:42Z")

</div>

```auto
k = 1+Math.random()*2;

```

Change the 2.

here’s how I have made one before:

```auto

mover = function () {
	this._y += this.k, this._x += (Stage.width/2-_xmouse)/(snowResistance*10);
	this._y>Stage.height+20 || (this._x>Stage.width+20 && (Stage.width/2-_xmouse)/(snowResistance*10)>0) || (this._x<-20 && (Stage.width/2-_xmouse)/(snowResistance*10)<0) ? refresh(this) : null;
};
init=function () {
	snowResistance=4, fallSpeed=4, max_snowsize=3, snowflakes=350;
	for (i=0; i<snowflakes; i++) {
		snow.duplicateMovieClip("snow"+i, i, {_alpha:20+Math.random()*60, _x:-(Stage.width/2)+Math.random()*(1.5*Stage.width), _y:-(Stage.height/2)+Math.random()*(1.5*Stage.height), k:1+Math.random()*fallSpeed, onEnterFrame:mover});
		_root["snow"+i]._xscale = _root["snow"+i]._yscale=50+Math.random()*(max_snowsize*20);
	}
}, init();
function refresh(which) {
	which._x=Math.random()*Stage.width+((Stage.width/2-_xmouse)/(snowResistance*10)>0 ? -random(250) : random(250)), which._y=(which._x<Stage.width && which._x>0) ? -20 : Math.random()*Stage.height;
}

```

with one mc(5x5px), instance name snow.
