Error #2025: The supplied DisplayObject must be a child of the caller
is the message I’m getting when I try to remove all the movieclips in an array. I understand why it’s happening: I’ve already removed one of the movieclips earlier. I tried putting an if statement in the loop to remove it, but the movie clip still exist, and the trace statement doesn’t return null.
for(var i=0;i<totalBalloons;i++){
trace(“balloonarray:”+balloonArray*);
if(balloonArray*!=‘null’){
this.removeChild(balloonArray*);
}
}