home *** CD-ROM | disk | FTP | other *** search
- class com.techsmith.utils.AbstractReader
- {
- var reader;
- var xmlObject;
- function AbstractReader(s)
- {
- if(this.reader == undefined)
- {
- this.reader = this;
- this.xmlObject = new XML();
- this.xmlObject.ignoreWhite = true;
- this.xmlObject.onLoad = com.techsmith.utils.Delegate.create(this,this.readXML);
- this.xmlObject.load(s);
- mx.events.EventDispatcher.initialize(this);
- }
- return undefined;
- }
- function dispatchEvent()
- {
- }
- function addEventListener()
- {
- }
- function removeEventListener()
- {
- }
- function readXML(success)
- {
- if(success)
- {
- var _loc2_ = undefined;
- _loc2_ = this.parse();
- this.sendEvent(_loc2_);
- }
- else
- {
- trace("unable to load config file: ");
- this.dispatchEvent({target:this,type:"xmlLoadError"});
- }
- }
- function parse()
- {
- return this.xmlObject;
- }
- function sendEvent(evt)
- {
- this.dispatchEvent({target:this,type:"xmlLoadComplete",data:evt});
- delete this.xmlObject;
- }
- }
-