Expand my Community achievements bar.

How to wait for the result of java Remote Object

Avatar

Level 2
Hi



In an action script function, I call a java remote object.
But, the next commands do not wait for the result of the invoked
java remote object to be returned.

How can I force my function to wait for the result of my java
Remote Object before the next commends get execuated?



Best regards

1 Reply

Avatar

Level 1
I think you are looking fort that :

( from my application )



dataService.fill(maxPrice, 'maxPrice');

dataService.addEventListener(ResultEvent.RESULT,
resultEventHandlerMaxPrice);



private function displayData(event:ResultEvent):void {

display.display(this.products);

}





So I have an event which is waiting for the result before do
anything