# Loading external swfs...Directory path spaghetti!

**URL:** <https://forum.kirupa.com/t/loading-external-swfs-directory-path-spaghetti/161110>\
**Category:** Uncategorized\
**Created:** [August 31, 2005, 11:08pm UTC](https://forum.kirupa.com/t/loading-external-swfs-directory-path-spaghetti/161110 "2005-08-31T23:08:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregle](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gregle/32/1687_2.png) [@gregle](https://forum.kirupa.com/u/gregle)\
**Post date:** [August 31, 2005, 11:08pm UTC](https://forum.kirupa.com/t/loading-external-swfs-directory-path-spaghetti/161110/1 "2005-08-31T23:08:04Z")

</div>

Hi folks…I’ve hit a wall in trying to load external swfs into my main ‘container’ movie. I’m pretty sure it’s because I’m not spelling out my directory paths correctly. Gosh…I hope I don’t “make spaghetti” out of explaining it. Here goes…

I’ve created two empty movie clips in my ‘container’ movie (“blank\_mc2” for my ‘nav’ swf; “blank\_mc” is for my content) using the following AS:

this.createEmptyMovieClip(“blank\_mc”, 1);  
with (blank\_mc){  
\_x=0;  
\_y=0;  
}  
this.createEmptyMovieClip(“blank\_mc2”, 2);  
with (blank\_mc2){  
\_x=0;  
\_y=0;  
}  
loadMovie(“home.swf”, blank\_mc);  
loadMovie(“nav.swf”, blank\_mc2);  
stop();

Each movie loads fine into my container movie. Here’s where I think I’m lost: In my “nav.swf” file, I have my nav buttons condensed into a movie clip on the main timeline…in other words, the buttons themselves do not reside on the main timeline. A movieclip containing the buttons resides on the main timeline.

On release, I want my buttons to unload whatever is residing in “blank\_mc”, which resides in my ‘container’ movie (which would be “\_parent”, right?), and load a new movie into this same “blank\_mc”.

Here’s the code I have attached to one of my buttons:

on (release) {  
unloadMovie(blank\_mc.\_parent);  
loadMovie(“about.swf”, blank\_mc.\_parent);

}

This isn’t working…and I suspect it’s because my buttons are nested in a movie clip. I suspect if I moved my buttons to the main timeline, it would probably work. But I have other reasons for not doing this.

Is there some additional variable I should be attaching to “blank\_mc.\_parent”? Is this even possible?

Appreciate any help. I hope I didn’t further complicate the matter in trying to explain it. Thanks in advance!

Greg
