Ok I have an empty movieclip called picture, i am trying to load an image by using XML
I traced xmlData.Book[0].author and it DOES return “grace.png” which is the name of the image! So what is wrong with the below text?? Thanks!
x
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
var imageLoader:URLLoader = new URLLoader();
var image = xmlData;
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest(“sampleXML.xml”));
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
image = xmlData.Book[0].author
picture.loadMovie(image);
}