/* ======================================================================== XMLloader Class for AS2 ver 1.1 code by 月光 http://www.flashanywhere.net/vip/moonlight Last update:2005.1.27 ======================================================================== 更新日志: 2005.1.27 V 1.1 addEventListener在类内部使用,FLASH端调用时能更方便的使用各种事件 2005.1.22 V 1.0 开发完成 ======================================================================== */ // 请根据本地AS2程序路径来修改 mx.myClass.XMLloader class XMLloader extends XML { private var onLoadStartEvent:Array; private var onLoadErrorEvent:Array; private var onLoadCompleteEvent:Array; public function XMLloader() { onLoadStartEvent = new Array(); onLoadErrorEvent = new Array(); onLoadCompleteEvent = new Array(); this.addEventListener("onLoadStart", this); this.addEventListener("onLoadError", this); this.addEventListener("onLoadComplete", this); this.ignoreWhite = true; this.onData = function(src) { this.addEvent("onLoadStart"); src != null ? [this.addEvent("onLoadComplete"), this.parseXML(src)] : this.addEvent("onLoadError"); }; this.load(arguments[0]); } private function addEvent():Void { var arr = this[arguments[0]+"Event"]; var i = 0; while (i