I'm trying to move some code out of my MXML into AS classes but having trouble with the RemoteObject. The following code:
<mx:RemoteObject id="remoteObject" destination="genericDestination">
<mx:method name="myMethod" result="gotServerData(event)"/>
</mx:RemoteObject>
How do I go about setting up the remoteObject method programmatically?

