Actionscript:
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlLoader.addEventListener(Event.COMPLETE, loadComplete);
xmlLoader.load(new URLRequest("slideshow.xml"));
function loadComplete(e:Event):void {
xmlData = new XML(e.target.data);
for each (var picture:XML in xmlData.picture) {
trace("Url: " + picture.url);
trace("Heading: " + picture.heading);
trace("Description: " + picture.description);
}
}
0 comments:
Post a Comment