Hi Folks!

I have a doubt of how to remove a movieClip from the stage using
removeChild.
I put some sample code in this message and the mc 'ball' has a sound in it.
The process to attach a movie clip on Stage works fine! Also the process to
remove but...

Why does the sound still play without the object on Stage?
What can I do to remove it really from the memory?

var ball:MovieClip = new Ball();
ball.x = ball.y = 100;
addChild(ball);
stage.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
function onClick(evt:MouseEvent):void {
    stage.removeEventListener(MouseEvent.CLICK, onClick);
    this.removeChild(ball);
    ball=null
    trace(ball)
}

If somebody help me to fix it and continue my job, I'll be very thankful!

-- 
Marcelo
-----------------------------------------
Email - Msn - GTalk
[email protected]
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to