Oh my GOD!! I’m so frustrated! I’ve spent a week on this. I can’t find a solution for this anywhere. Someone please help!
Using Actionscript 3.0 I’m trying to create a mock windows interface whereby users can open up a series of windows, drag them around, and close them.
The “windows” are external swf files that I load into the main movie. No problem there. But here’s the problem: each “window” has a close button, and getting the external swfs to leave the stage when the user clicks the close button is KILLING me! How the f*** do I make the close buttons on the windows work?
I’ve tried parent.removeChild(this);
I’ve tried this.parent.removeChild();
I’ve tried parent.removeChild(nameofswf);
Each of these options generate a “ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at bio_fla::MainTimeline/closeBio()”
I’ve tried EVERYTHING!!! I’m so mad. The worst part is, when I open the windows themselves, outside the main movie, the close buttons work fine. They remove the movie clips from thier own stages. How do I remove them when they’re loaded into the MAIN stage?!
Can someone please help me? Please?