home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 136 / MOBICLIC136.ISO / pc / DATA / HOTE / libs / amfphp / amfphp.swf / scripts / __Packages / mx / remoting / NetServiceProxyResponder.as < prev    next >
Text File  |  2011-07-20  |  2KB  |  58 lines

  1. class mx.remoting.NetServiceProxyResponder extends Object
  2. {
  3.    function NetServiceProxyResponder(serv, method)
  4.    {
  5.       super();
  6.       this.service = serv;
  7.       this.methodName = method;
  8.    }
  9.    function onResult(result)
  10.    {
  11.       var _loc2_ = result;
  12.       var _loc1_ = this.service.client;
  13.       if(_loc2_ instanceof mx.remoting.NetServiceProxy || _loc2_ instanceof mx.remoting.RecordSet)
  14.       {
  15.          _loc2_._setParentService(this.service);
  16.       }
  17.       var _loc3_ = this.methodName + "_Result";
  18.       if(typeof _loc1_[_loc3_] == "function")
  19.       {
  20.          _loc1_[_loc3_].apply(_loc1_,[_loc2_]);
  21.       }
  22.       else if(typeof _loc1_.onResult == "function")
  23.       {
  24.          _loc1_.onResult(_loc2_);
  25.       }
  26.       else
  27.       {
  28.          mx.remoting.NetServices.trace("NetServices","info",1,_loc3_ + " was received from server: " + _loc2_);
  29.       }
  30.    }
  31.    function onStatus(result)
  32.    {
  33.       var _loc2_ = result;
  34.       var _loc1_ = this.service.client;
  35.       var _loc3_ = this.methodName + "_Status";
  36.       if(typeof _loc1_[_loc3_] == "function")
  37.       {
  38.          _loc1_[_loc3_].apply(_loc1_,[_loc2_]);
  39.       }
  40.       else if(typeof _loc1_.onStatus == "function")
  41.       {
  42.          _loc1_.onStatus(_loc2_);
  43.       }
  44.       else if(typeof _root.onStatus == "function")
  45.       {
  46.          _root.onStatus(_loc2_);
  47.       }
  48.       else if(typeof _global.System.onStatus == "function")
  49.       {
  50.          _global.System.onStatus(_loc2_);
  51.       }
  52.       else
  53.       {
  54.          mx.remoting.NetServices.trace("NetServices","info",2,_loc3_ + " was received from server: <" + _loc2_.level + "> " + _loc2_.description);
  55.       }
  56.    }
  57. }
  58.