Cant figure out how to stop it snowing... please help :(
Heya, new ish with flash and actionscript, learning at college and im enjoying it so much im rushing ahead and doing my own thing... thought i would be clever and create a snow effect, alas i cant get it to stop when i want to to, tried all sorts of stop; stopall; commands but its not happening...
Thanks either way for any help ![]()
Heres the code im using...
addEventListener (Event.ENTER_FRAME,snow);
function snow (event:Event):void {
var scale:Number=Math.random()*.6;
var _sf:Snowflake1=new Snowflake1();
_sf.x=Math.random()*1024;
_sf.scaleX=scale;
_sf.scaleY=scale;
var speed:Number=Math.random()*2;
var RA:Array=new Array(-1,1);
var lf:int=RA[Math.round(Math.random())];
stage.addChild (_sf);
_sf.addEventListener (Event.ENTER_FRAME,snowfall);
function snowfall (event:Event):void {
_sf.y+=speed;
_sf.rotation+=Math.random()*20;
_sf.x+=(Math.random()*2)*lf;
}
}
Thanks again either way
