找多少写多少,暂时就这点。
var myLoader:URLLoader=new URLLoader(); myLoader.load(new URLRequest("tplay.xml")); myLoader.addEventListener(ProgressEvent.PROGRESS, onLoadProgress); myLoader.addEventListener(Event.COMPLETE,XMLfunc); myLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError); function onLoadProgress(event:ProgressEvent):void { var loadedPct:uint = Math.round(100 * (event.bytesLoaded / event.bytesTotal)); trace( loadedPct + "% loaded."); } function onIOError(e:Event):void { trace("地址加载错误!"); } function XMLfunc(e:Event):void { trace(e.target.data); }