FORUMS: list search recent posts

Can't make it stop snowing

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alex Mead
Can't make it stop snowing
on Dec 21, 2009 at 9:37:25 pm

Hello - I am new to Flash and certainly Action Script. I recently created an animation with the help of an IStock Flash animation.

http://ctlighting.com/ctlight/flash-test.html

I am trying to stop it from snowing but am unable to. I would like it to stop after my first banner with is frame 100. The action script is below.

snowNumber = 70;
var flakes:Array = new Array("snow", "flake2", "flake3","flake4")
for (i=0; 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;
};
}

Does anyone know how to make it stop snowing?

Thanks


Return to posts index

Mike Smith
Re: Can't make it stop snowing
on Dec 22, 2009 at 9:06:41 am

Well it seems to be operating onEnterFrame, so you could try a Stop()action ...


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]