# Loading external swf with attatched xml into main swf

**URL:** <https://forum.kirupa.com/t/loading-external-swf-with-attatched-xml-into-main-swf/185339>\
**Category:** Uncategorized\
**Created:** [April 12, 2006, 4:23pm UTC](https://forum.kirupa.com/t/loading-external-swf-with-attatched-xml-into-main-swf/185339 "2006-04-12T16:23:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nemedia](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@nemedia](https://forum.kirupa.com/u/nemedia)\
**Post date:** [April 12, 2006, 4:23pm UTC](https://forum.kirupa.com/t/loading-external-swf-with-attatched-xml-into-main-swf/185339/1 "2006-04-12T16:23:20Z")

</div>

ok so here the problem:

i have a dynamically generated menu which is made up of a swf and an xml files (thankyou to [kortexvfd](http://www.kirupa.com/forum/member.php?u=42348) for the help), i want to be able to load these into my main swf, now the code i have got for the button is:

on (release) {  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “assets/swf/MenuTemplate”;  
container.loadMovie(“assets/swf/MenuTemplate.swf”);  
} else if (\_root.currMovie != “assets/swf/MenuTemplate”) {  
if (container.\_currentframe \>= container.midframe) {  
\_root.currMovie = “assets/swf/MenuTemplate”;  
container.play();  
}  
}  
}

yet when is click on the button the swf loads but i get the follwing error:

Error opening URL “file:///C|/Documents%20and%20Settings/alex%2Dwork/Desktop/Betatest/Flash/menu.xml”

when i place a copy of the xml into the above folder it crashes flash 8 so what do i need to do to correct this problem?

---

<div class="post-metadata">

**Author:** ![bootiteq](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@bootiteq](https://forum.kirupa.com/u/bootiteq)\
**Post date:** [April 12, 2006, 10:24pm UTC](https://forum.kirupa.com/t/loading-external-swf-with-attatched-xml-into-main-swf/185339/2 "2006-04-12T22:24:40Z")

</div>

Make the link to your xml relative to the main swf which your external swfs load into.

---

<div class="post-metadata">

**Author:** ![nemedia](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@nemedia](https://forum.kirupa.com/u/nemedia)\
**Post date:** [April 12, 2006, 10:32pm UTC](https://forum.kirupa.com/t/loading-external-swf-with-attatched-xml-into-main-swf/185339/3 "2006-04-12T22:32:06Z")

</div>

> [@bootiteq](#):
>
> Make the link to your xml relative to the main swf which your external swfs load into.

how do i do that? example of code?
