# Unload SWF loaded into MC

**URL:** https://forum.kirupa.com/t/unload-swf-loaded-into-mc/277901
**Category:** flash
**Created:** [December 18, 2008, 3:48pm UTC](https://forum.kirupa.com/t/unload-swf-loaded-into-mc/277901 "2008-12-18T15:48:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![alemieux34](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@alemieux34](https://forum.kirupa.com/u/alemieux34)
#### Post date: [December 18, 2008, 3:48pm UTC](https://forum.kirupa.com/t/unload-swf-loaded-into-mc/277901/1 "2008-12-18T15:48:31Z")

</div>

I have a script which loads a SWF file into a movie clip called holder\_mc. There is a button in the loaded SWF called close\_btn. When this button is clicked, it should remove the loaded SWF from the holder\_mc. I’ve tried the following:

close\_btn.addEventListener(MouseEvent.CLICK, closeMe);  
function closeMe(evt:MouseEvent):void {  
holder.unload();  
}

But the communication is all wrong. I’ve tried parent.parent. root.parent., etc.

Any suggestions?
