# Can't unload already opened .swf from newly opened .swf

**URL:** <https://forum.kirupa.com/t/cant-unload-already-opened-swf-from-newly-opened-swf/157868>\
**Category:** Uncategorized\
**Created:** [August 4, 2005, 8:42pm UTC](https://forum.kirupa.com/t/cant-unload-already-opened-swf-from-newly-opened-swf/157868 "2005-08-04T20:42:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![keul70](https://avatars.discourse-cdn.com/v4/letter/k/f4b2a3/32.png) [@keul70](https://forum.kirupa.com/u/keul70)\
**Post date:** [August 4, 2005, 8:42pm UTC](https://forum.kirupa.com/t/cant-unload-already-opened-swf-from-newly-opened-swf/157868/1 "2005-08-04T20:42:26Z")

</div>

I am not so good with actionscript, …trying to learn unloading external files.

I have 6 movies

Mainmovie1.swf  
first3buttons.swf  
bio.swf, history.swf, contact.swf, newmenu.swf

first3buttons.swf loads atop Mainmovie.swf

First3buttons.swf contains only 3 buttons(bio, history, contact) and movieclips holder(biomc, historymc, contactmc, newmenumc) for each of these external files …So when i click bio from first3buttons.swf it should show bio.swf and also newmenu.swf. upto here everything works perfectly. But now I wanna use the menus from newmenu.swf, which is basically same like the first3buttons.swf , but in different shapes and colors. So within newmenu.swf I have again created 3 Movie clips (mcbio, mchistory, mccontact) for bio.swf, history.swf and contact.swf. And when i click one of the buttons it opens the corresponding file, but within this newmenu.swf. Which means the new opened file is under the earlier opened bio.swf. And I can’t seem to figure out how to unload or remove the already opened external files.

from the newmenu.swf I’ve given the following script to open files

on (release) {  
loadMovie (“contact.swf”, “mccontact”);  
}  
on (release) {  
unloadMovie (“bio1”);  
}  
this works only if the “bio1” is a movieclip inside newmenu.swf . but in this case it was inside first3buttons.swf,

then I’ve tried the following code ,but without any result.

on (release) {  
\_root.first3buttonsmc.unloadMovie(“first3buttons.swf”)  
}

what am I missing here? Any help or suggestions would be greatly appreciated,

Thanks  
Keul
