Minimum code required to load XML at run-time is given below:
SOURCE CODE
SOURCE CODE
var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener (Event.COMPLETE, onEventComplete);
urlLoader.load (new URLRequest('Database.xml'));
function onEventComplete (e:Event):void
{
var Xml:XML = new XML(URLLoader(e.target).data);
trace (Xml);
}
Comments
Post a Comment