I can I get the XML data from 3rd function?
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class main extends MovieClip {
private var myXML:XML;
private var myXMLlist:XMLList;
private var myLoader:URLLoader = new URLLoader();
public function main():void {
loadData();
3rdfunction();
}
private function loadData():void {
myLoader.load(new URLRequest("data.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);
}
private function processXML(e:Event):void {
myXML=new XML(e.target.data);
trace(myXML.length())
}
private function 3rdfunction():void {
trace(myXML);
}