# Snow Falling Without Dissappearing

**URL:** <https://forum.kirupa.com/t/snow-falling-without-dissappearing/208887>\
**Category:** flash\
**Created:** [December 4, 2006, 1:31am UTC](https://forum.kirupa.com/t/snow-falling-without-dissappearing/208887 "2006-12-04T01:31:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomyknoker](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@tomyknoker](https://forum.kirupa.com/u/tomyknoker)\
**Post date:** [December 4, 2006, 1:31am UTC](https://forum.kirupa.com/t/snow-falling-without-dissappearing/208887/1 "2006-12-04T01:31:19Z")

</div>

Hi Guys,

With the attached file I’ve got some snow falling, I want the snow to build up st the bottom of the file like it would in real life… If anyone has any ideas would be great! Also here is the code if that helps…

```auto
snowNumber = 70;
var flakes:Array = new Array("snow", "flake2", "flake3","flake4") 
for (i=0; i<snowNumber; i++) {
	newSnow = _root[flakes[random(flakes.length)]].duplicateMovieClip("snow"+i, i);
	newSnow._x = Math.random()*Stage.width;
	newSnow._y = -Math.random()*300;
	newSnow.maxSnowSpeed = Math.random()*4;
	newSnow.wind = Math.random()*6;
	newSnow._xscale = newSnow._yscale = newSnow.alpha = Math.random()*60+40
	newSnow.onEnterFrame = function() {
		this._rotation -= this.maxSnowSpeed+1;
		if(this._y>Stage.height || this._x>Stage.width || this._x<0){
			this._y = -Math.random()*300;
			this._x = Math.random()*Stage.width;
		} else {
			this._y += this.maxSnowSpeed+1;
			this._x += this.wind-4;
		}
		
		this._alpha = this.alpha;
	};
}

```
