import mx.controls.Alert;
import mx.rpc.remoting.RemoteObject;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
[Bindable]
public var empList:Object;
public var employeeRO:RemoteObject;
public function useRemoteObject(intArg:int, strArg:String):void
{
employeeRO = new RemoteObject();
employeeRO.destination = "EmpManager";
employeeRO.getList.addEventListener("result",getListResultHandler);
employeeRO.addEventListener("fault", faultHandler);
employeeRO.getList("AAA");
}
public function getListResultHandler(event:ResultEvent):void {
empList = event.result;
}
public function faultHandler (event:FaultEvent):void {
Alert.show(event.fault.faultString, 'Error');
}