home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Darbas / kidoz_v1.air / kidoz.swf / scripts / mx / rpc / soap / LoadEvent.as < prev    next >
Encoding:
Text File  |  2009-05-06  |  1.4 KB  |  51 lines

  1. package mx.rpc.soap
  2. {
  3.    import flash.events.Event;
  4.    import flash.xml.XMLDocument;
  5.    import mx.rpc.events.WSDLLoadEvent;
  6.    import mx.rpc.wsdl.WSDL;
  7.    
  8.    public class LoadEvent extends WSDLLoadEvent
  9.    {
  10.       public static const LOAD:String = "load";
  11.       
  12.       private var _document:XMLDocument;
  13.       
  14.       public function LoadEvent(param1:String, param2:Boolean = false, param3:Boolean = true, param4:WSDL = null, param5:String = null)
  15.       {
  16.          super(param1 == null ? LOAD : param1,param2,param3,param4,param5);
  17.       }
  18.       
  19.       public static function createEvent(param1:WSDL, param2:String = null) : LoadEvent
  20.       {
  21.          return new LoadEvent(LOAD,false,true,param1,param2);
  22.       }
  23.       
  24.       public function get document() : XMLDocument
  25.       {
  26.          if(_document == null && xml != null)
  27.          {
  28.             try
  29.             {
  30.                _document = new XMLDocument(xml.toXMLString());
  31.             }
  32.             catch(e:Error)
  33.             {
  34.             }
  35.          }
  36.          return _document;
  37.       }
  38.       
  39.       override public function toString() : String
  40.       {
  41.          return formatToString("LoadEvent","location","type","bubbles","cancelable","eventPhase");
  42.       }
  43.       
  44.       override public function clone() : Event
  45.       {
  46.          return new LoadEvent(type,bubbles,cancelable,wsdl,location);
  47.       }
  48.    }
  49. }
  50.  
  51.