dimanche 5 février 2017

Actionscript - Multiple eventListeners for single RemoteObject call

I have created a service on a server called 'secure_call'. This service is meant to allow access to previously available services by verifying the call. The first three parameters are used by secure_call, the rest are past to the named function.

    <s:RemoteObject id="cursor" destination="dest" source="src" endpoint="end" showBusyCursor="true" />


private var approve_time:AbstractOperation;
private var approve_expenses:AbstractOperation;

private function creation_complete():void {

    approve_time.addEventListener(ResultEvent.RESULT, approve_time_amf);
    approve_expenses.addEventListener(ResultEvent.RESULT, approve_expenses_amf);

private function app_time():void{
            approve_time.send('approve_time', id, timestamp, week_key);
private function app_expenses():void{
            approve_expenses.send('approve_expenses', id, timestamp, week_key);


However, now I am uncertain how to handle event listeners. I have tried to handle it by using the above code, but each eventListener gets called when either event happens. Is there a way to attach an event listener to a specific use of secure_call?

Aucun commentaire:

Enregistrer un commentaire