1 Reply Latest reply on Dec 19, 2006 4:13 AM by chris.huston.t10

    how to declare a RemoteObject in ActionScript and invoke its method?

    01robert
      how to declare a RemoteObject in ActionScript and invoke its method?

      I means in ActionScript, not in MXML.
        • 1. Re: how to declare a RemoteObject in ActionScript and invoke its method?
          chris.huston.t10 Level 3
          Here is a function that will declare a RemoteObject:

          import mx.rpc.remoting.RemoteObject;

          private function remoteExample():void {
          var ro:RemoteObject = new RemoteObject();
          ro.destination = "DestinationName"; //the same name as the service config for the compiler
          ro.source = "RemoteClassFile";
          ro.remoteMethod.addEventListener("result", result_function);
          ro.remoteMethod.addEventListener("fault", remoteFault);
          ro.remoteMethod(someParameterIfNeeded); //invokes remote method
          }

          Vygo