# Mx 2004; unload external .swf

**URL:** https://forum.kirupa.com/t/mx-2004-unload-external-swf/233644
**Category:** Uncategorized
**Created:** [July 25, 2007, 5:46pm UTC](https://forum.kirupa.com/t/mx-2004-unload-external-swf/233644 "2007-07-25T17:46:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tigerMenace](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@tigerMenace](https://forum.kirupa.com/u/tigerMenace)
#### Post date: [July 25, 2007, 5:46pm UTC](https://forum.kirupa.com/t/mx-2004-unload-external-swf/233644/1 "2007-07-25T17:46:29Z")

</div>

Hello Everyone,

This is a great site/forum & has already helped me out a lot. I appreciate all of the advice this site has already given me.

Following this tutorial [http://www.kirupa.com/developer/mx/preloader\_transition.htm](http://www.kirupa.com/developer/mx/preloader_transition.htm) I’m able to load external .swf’s (which contain video with audio) into an empty movie clip called “content”.

Problem:  
I need to figure out how to unload these .swf’s. The funtions for the buttons are assigned in a frame on the timeline and looks like this:

b1.onRelease = function() {  
if (\_root.section != “welcome.swf”) {  
\_root.section = “welcome.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
}  
}

Does the unloadMovie action go in the above button funtion or does it go into the “content” movie clip?

Here’s the actioscript for the “contect” mc.

onClipEvent (enterFrame) {  
if (!loaded && this.\_url != \_root.\_url) {  
if (this.getBytesLoaded() == this.getBytesTotal()) {  
loaded = true;  
\_root.transition.gotoAndPlay(“opening”);  
}  
}  
}

I really appreciate all of your help. Thanks.
