The purpose of this tutorial is to show how to load XML data into Flash
var data:XML = new XML();
var xml_Loader:URLLoader = new URLLoader();
xml_Loader.load(new URLRequest("your_XML_file.xml"));
// once that data is loaded, the event will be passed to the do_XML function
xml_Loader.addEventListener(Event.COMPLETE, do_XML);
function doXML(e:Event):void {
// data sits in the event's target (aka the load)'s data
data = new XML(e.target.data);
for (var i:int = 0; i<data.*.length(); i++){
//.... do something here
trace(data.*);
};
}
Thanx to Faisal Rasim