views:

373

answers:

1

What's the ActionScript equivalent of this MXML?

<mx:RemoteObject id="Server" destination="Server" source="gb.informaticasystems.Server" fault="handler_backendCommunicationFails(event)" >
  <mx:method name="executeQuery" result="handler_fetchDataRequestSuccess(event)"/>
</mx:RemoteObject>

TIA!

+3  A: 

You just need to call:

Server.executeQuery(...);

After it executes, you handle the result in your handler, which you specified as:

private function handler_fetchDataRequestSuccess(event:ResultEvent);

EDIT: Let me translate the MXML:

var Server:RemoteObject = new RemoteObject();
Server.destination = "Server";
Server.source = "gb.informaticasystems.Server";
Server.executeQuery.addEventListener("result", handler_fetchDataRequestSuccess);
Server.executeQuery.addEventListener("fault", handler_backendCommunicationFails);
CookieOfFortune