# XML loading

**URL:** <https://forum.kirupa.com/t/xml-loading/217499>\
**Category:** flash\
**Created:** [February 27, 2007, 3:20pm UTC](https://forum.kirupa.com/t/xml-loading/217499 "2007-02-27T15:20:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [February 27, 2007, 3:20pm UTC](https://forum.kirupa.com/t/xml-loading/217499/1 "2007-02-27T15:20:01Z")

</div>

hi there …

I am trying to load a SWF into an MC ("window\_mc) via XML ( I guess like loading a photo ).

Here is my XML code (called “actions.xml”):

\<actionscript\>  
\<LocatioN file=“level\_5.swf”/\>  
\</actionscript\>

&Here is my AS:

var x:XML = new XML();  
x.ignoreWhite = true;

var urls:Array = new Array ();

x.onLoad = function (){  
var LocatioN:Array = this.firstChild.childNodess;  
for (i=0;i\<LocatioN.attributes;i++) {  
urls.push(LocatioN\*.attributes.file);  
}  
window\_mc.loadMovie(urls[0]);  
}

x.load(“actions.xml”);

-----------it doesnt want to work------------ what have I done wrong??

Help would be Ace…
