# Snow effect without the mouse effects required \[asdvanced snow from free source\]

**URL:** <https://forum.kirupa.com/t/snow-effect-without-the-mouse-effects-required-asdvanced-snow-from-free-source/186745>\
**Category:** flash\
**Created:** [April 24, 2006, 10:18am UTC](https://forum.kirupa.com/t/snow-effect-without-the-mouse-effects-required-asdvanced-snow-from-free-source/186745 "2006-04-24T10:18:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [April 24, 2006, 10:18am UTC](https://forum.kirupa.com/t/snow-effect-without-the-mouse-effects-required-asdvanced-snow-from-free-source/186745/1 "2006-04-24T10:18:57Z")

</div>

Hi all.

Managed to find this really cool snow effect but trying to remove the mouse interaction, but in doing so the snow seems to stop or fade after five or ten seconds due to removing the mouse elements, however if they are in place without any hit with the mouse the snow still continues to fall regardless so in effect I need the snow to keep running without any effect from the mouse, here is the actionscript as below. Any help would be great.

cheers

```auto

//
var total = 0;
//
function setQuality(thisSpeed) {
	if (thisSpeed == 1) {
		total = 100;
	} else if (thisSpeed == 2) {
		total = 300;
	} else {
		total = 400;
	}
}
setQuality(_global.speed);
/////////////////////////////////////
function createParticles() {
	for (var i = 0; i<total; i++) {
		this.ele.attachMovie("bit", "bit"+i, i++);
		var clip = this.ele["bit"+i];
		clip.force = 0;
		clip.mn = 1+Math.random()*1.5;
		clip.x = Math.random()*2-0.75;
		clip.y = Math.random()*2;
		clip._x = (Math.random()*this.frame_mc._width)+left;
		clip._y = Math.random()*200-220;
		clip._xscale = 70+Math.random()*290;
		clip._yscale = 70+Math.random()*290;
		clip.ct = Math.floor(Math.random()*60);
		clip.c = 0;
		
		clip.onEnterFrame = function() {
			this.c++;
			if (this._x<_x/*mouse*/) {
				this.x -= this.force;
			} else {
				this.x += this.force;
			}
						
			if (this.force>0) {
				this.c = 0;
				this.force *= 0.6;
				if (this.force<0.05) {
					this.force = 0;
				}
			}
			
			if (this.c>this.ct) {
				this.x = Math.random()*5-1.5;
				this.c = 0;
				this.ct = Math.floor(Math.random()*60);
			}
			
			this._y += (this.y+this.mn)-(this.force*9);
			this._x += this.x;
			if (this._x<left-5) {
				this.x = Math.random()*5-1.5;
				this.force = 0;
				this._x = right+2;
			}
			if (this._x>right+5) {
				this.x = Math.random()*5-1.5;
				this.force = 0;
				this._x = left-2;
			}
			if (this._y>_y/*mouse*/-25 && this._y<_y/*mouse*/+25 && this._x>_x/*mouse*/-35 && this._x<_x/*mouse*/+35) {
				this.force += Math.random()*5;
			} else if (this._y>=bottom+5) {
				this.force = 0;
				this.x = Math.random()*5-1.5;
			}
		};
	}
}

//
/*function clearAll() {
	for (var i = 1; i<=total; i++) {
		removeMovieClip(this.ele["bit"+i]);
	}
}*/
//
createParticles();
//stop();

 

```

---

<div class="post-metadata">

**Author:** ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)\
**Post date:** [April 24, 2006, 9:14pm UTC](https://forum.kirupa.com/t/snow-effect-without-the-mouse-effects-required-asdvanced-snow-from-free-source/186745/2 "2006-04-24T21:14:38Z")

</div>

=)  
[http://www.kirupa.com/developer/mx/snow.htm](http://www.kirupa.com/developer/mx/snow.htm)

---

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [April 25, 2006, 11:55am UTC](https://forum.kirupa.com/t/snow-effect-without-the-mouse-effects-required-asdvanced-snow-from-free-source/186745/3 "2006-04-25T11:55:12Z")

</div>

Thanks for the reply, yes I am aware of that snow scene, but this is much more advanced and is more realistic, please have a look at the code again.

Cheers

---

<div class="post-metadata">

**Author:** ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)\
**Post date:** [April 25, 2006, 2:54pm UTC](https://forum.kirupa.com/t/snow-effect-without-the-mouse-effects-required-asdvanced-snow-from-free-source/186745/4 "2006-04-25T14:54:58Z")

</div>

errr, no, you need to look at the code again. They do exactly the same thing. The one I posted just doesnt have the mouse interaction which is exactly what you said you wanted.

---

<div class="post-metadata">

**Author:** ![no\_rain](https://avatars.discourse-cdn.com/v4/letter/n/a3d4f5/32.png) [@no\_rain](https://forum.kirupa.com/u/no_rain)\
**Post date:** [April 26, 2006, 12:42am UTC](https://forum.kirupa.com/t/snow-effect-without-the-mouse-effects-required-asdvanced-snow-from-free-source/186745/5 "2006-04-26T00:42:12Z")

</div>

pwned

---

<div class="post-metadata">

**Author:** ![FrankieB](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/frankieb/32/1238_2.png) [@FrankieB](https://forum.kirupa.com/u/FrankieB)\
**Post date:** [April 26, 2006, 3:23am UTC](https://forum.kirupa.com/t/snow-effect-without-the-mouse-effects-required-asdvanced-snow-from-free-source/186745/6 "2006-04-26T03:23:42Z")

</div>

> [@no\_rain](#):
>
> pwned

:lol:
