# Loading and unloading external swf's

**URL:** <https://forum.kirupa.com/t/loading-and-unloading-external-swfs/331575>\
**Category:** flash\
**Created:** [September 2, 2013, 9:52am UTC](https://forum.kirupa.com/t/loading-and-unloading-external-swfs/331575 "2013-09-02T09:52:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quincy\_Beijse](https://avatars.discourse-cdn.com/v4/letter/q/df788c/32.png) [@Quincy\_Beijse](https://forum.kirupa.com/u/Quincy_Beijse)\
**Post date:** [September 2, 2013, 9:52am UTC](https://forum.kirupa.com/t/loading-and-unloading-external-swfs/331575/1 "2013-09-02T09:52:14Z")

</div>

Hi,

I’ve five swf’s (main.swf, why.swf,how.swf, who.swf and contact.swf)  
What I want is that if you press “why” he look if one of the other swf’s are loaded  
and if so. Go to specific frame on the loaded swf (“out”) and then go to “why”.  
My navigation is within a movieclip. on the main timelime.  
I know it have to do with if and else actions.

Im more of a designer then a code, if someone could please help me with this.

whyBTN.onRelease = function() {  
SWFAddress.setValue("why);  
}  
whyBTN.onRollOver = function() {  
SWFAddress.setStatus(“why”);  
}  
whyBTN.onRollOut = function() {  
SWFAddress.resetStatus();  
}  
howBTN.onRelease = function() {  
SWFAddress.setValue("how);  
}  
howBTN.onRollOver = function() {  
SWFAddress.setStatus(“how”);  
}  
howBTN.onRollOut = function() {  
SWFAddress.resetStatus();  
}  
whoBTN.onRelease = function() {  
SWFAddress.setValue("who);  
}  
whoBTN.onRollOver = function() {  
SWFAddress.setStatus(“who”);  
}  
BTN.onRollOut = function() {  
SWFAddress.resetStatus();  
}  
contactBTN.onRelease = function() {  
SWFAddress.setValue(“contact”);  
}  
contactBTN.onRollOver = function() {  
SWFAddress.setStatus(“contact”);  
}  
contactBTN.onRollOut = function() {  
SWFAddress.resetStatus();  
}  
SWFAddress.setStrict(false);  
SWFAddress.onChange = function() {  
var value = SWFAddress.getValue();

switch(value) {  
case "why:  
\_level3.gotoAndPlay(“out”)  
\_global.pagina = “why”;  
break;  
case “how”:  
\_level2.gotoAndPlay(“out”)  
\_global.pagina = “how”;  
break;  
case “who”:  
\_level1.gotoAndPlay(“out”)  
\_global.pagina = “contact”;  
break;  
case “contact”:  
\_level1.gotoAndPlay(“out”)  
\_global.pagina = “contact”;  
stop();  
break;  
}

}
