xmlLoader = new LoaderMax({name:"aName", autoDispose :true, onComplete:propsLoaded});
xmlLoader.append(new XMLLoader(curTaleDirectory+ "/" +Constants.PROPS_XML_FILENAME, {name:"anotherName"+_taleId.toString() , autoDispose :true, estimatedBytes:841 }));
xmlLoader.load();
private function propsLoaded(e:LoaderEvent):void {
var objects:Array = e.currentTarget.content;
var taleProps:XML = objects[0]; // This ONLY works on mobile devices..!
//TODO: Why doesnt it recognise the WHOLE file?
trace(taleProps); // prints this: <?xml version="1.0" encoding="utf-8"?>
}
<?xml version="1.0" encoding="utf-8"?>
<tale id="1">
<page id="1">
<taleText>
Lorem ipsum bla bla
</taleText>
<LoaderMax name="ft$1:page$1">
<MP3Loader name="ft$1:page$1:mc$1$always" url="page_1/backsound.mp3" estimatedBytes:"2050" autoPlay="false" />
<MP3Loader name="ft$1:page$1:mc$1$onClick" url="page_1/backsound.mp3" estimatedBytes:"2050" autoPlay="false" />
</LoaderMax>
</page>
<page id="2">
</page>
<page id="3">
</page>
<page id="4">
</page>
<page id="5">
</page>
<name>aName</name>
<purchased>true</purchased>
<pageCnt>20</pageCnt>
<url></url>
</tale>
I'm using the code above to load the above xml file.. Instead of getting the whole file loaded, I only get the first line.. Why is that?
Thank you.!