Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

RemoteObject

Avatar

Level 1
Hello!



We need cell remote method, for example:
remoteObject.getAllGoods();

How I can write structure below with ActionScript?



<mx:RemoteObject id="ro" destination="ordering" >

<mx:method name="getAllGoods"
result="resultHandler(event)"
fault="findAllFaultHandler(event)"/>

</mx:RemoteObject>
1 Reply

Avatar

Level 1
you'll have this in AS....



import mx.rpc.events.FaultEvent;

import mx.rpc.events.ResultEvent;

import mx.rpc.remoting.RemoteObject;



var ro:RemoteObject = new RemoteObject();

ro.destination = "ordering";

ro.addEventListener(FaultEvent.FAULT,findAllFaultHandler);

ro.addEventListener(ResultEvent.RESULT, resultHandler);

ro.getAllGoods();