# Removing SWF from main timeline

**URL:** <https://forum.kirupa.com/t/removing-swf-from-main-timeline/257339>\
**Category:** Uncategorized\
**Created:** [April 12, 2008, 10:53pm UTC](https://forum.kirupa.com/t/removing-swf-from-main-timeline/257339 "2008-04-12T22:53:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GriffinetSabine](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@GriffinetSabine](https://forum.kirupa.com/u/GriffinetSabine)\
**Post date:** [April 12, 2008, 10:53pm UTC](https://forum.kirupa.com/t/removing-swf-from-main-timeline/257339/1 "2008-04-12T22:53:07Z")

</div>

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?
