Ok so I made this “snow” script
stage.addEventListener(Event.ENTER_FRAME, blop);
function blop(e:Event):void {
var newCircle:BlueCircle = new BlueCircle();
this.addChild(newCircle);
newCircle.scaleX = Math.random();
newCircle.scaleY = newCircle.scaleX;
newCircle.x = Math.random()*550;
newCircle.y = 420;
newCircle.addEventListener(Event.ENTER_FRAME, goUp);
}
function goUp(e:Event):void {
var circleMC:MovieClip = MovieClip(e.target);
circleMC.y -= 3;
if (circleMC.y < 0) {
circleMC.removeEventListener(Event.ENTER_FRAME, goUp);
}
}
Now in the end where I got the “circleMC.removeEventListener(Event.ENTER_FRAME, goUp);” I’d like to also completely remove the MC from the stage.
Help please