Removing Movieclips from an Array Displayed on stage
Hi Everyone ,
I am new to AS3 so please forgive me in advance if I end up annoying anyone ;(
I need some help in removing Movie Clips from the stage , these were initially loaded off an array
Here is the Code with the NEXT Button , : for both ARRAYS , Notes and Notes15 ( referring to 15th frame)
function nextframepop2(Event:MouseEvent):void{
trace("Mouse Enabled");
removeChild(notes15[4]);
removeChild(notes15[3]);
removeChild(notes15[2]);
removeChild(notes15[1]);
removeChild(notes15[0]);
nextFrame();
function nextframepop1(Event:MouseEvent):void{
trace("Mouse Enabled");
removeChild(notes[1]); // This is Line 635 , but I am not sure what I am doing wrong here.
removeChild(notes[0]);
nextFrame();
}
I am calling this Function with an If Statement , I need to make sure all the Movie Clips are loaded before the End User decides to move to next slide.
Here is what I get when I run the Next Button ,
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at PORTDemoPresent_fla::MainTimeline/nextframepop1()[PORTDemoPresent_fla.MainTimeline::frame2:635]
Can anyone please help ?
