How to make synchronous data calls in ActionScript? - Flash
How to make synchronous data calls in ActionScript?
- Synchronous calls cannot be made in Action Script. Result Event can be used instead.
- Asynchronous Call Token is a natural way of calling data services.
- Use HTTPService, that is similar to RemoteObject and Web Service.
- Follow these steps:
1. Create a function for handling the data in return.
2. Embed the function name in the HTTPService tag and pass the event.
3. Make the script to invoke the function:
var invokeResponse = oEvent.call; // to get the object
var sQueryId = invokeResponse.tQueryId;
trace(sQueryId);