Can I dynamically instantiate a webservice or httpservice in actionscript? : adobe flex action script
Answer / Ravindra Singh Verma
Yes, you can dynamically instantiate WebService and HTTPService components in ActionScript. Here's an example:
```actionscript
import mx.rpc.http.HTTPService;
var myHttpService:HTTPService = new HTTPService();
myHttpService.url = 'your_webservice_url';
myHttpService.showBusyCursor = true;
myHttpService.resultFormat = mx.rpc.AsyncToken.FORMAT_OBJECT;
myHttpService.addEventListener(ResultEvent.RESULT, onResult);
myHttpService.send();
function onResult(event:ResultEvent):void {
// Handle the result here
}
```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is default frame rate of the timeline in frame per second?
What is calllater() method?
How binding works in mxml components in flex? : Adobe Flex ActionScript
What is shared object? (Or) how to store the data in local?
What is display object? : adobe flex action script
Explain the arguments of addeventlistener() method?
Why would you want to keep a reference to a changewatcher and call unwatch()? : adobe flex action script
What are all the events dispatched in item editor?
What are runtime shared libraries in flex? : adobe flex action script
What is the difference between sealed class and dynamic classes in flex? : Adobe Flex ActionScript
What is inheritance in term of oop (flash actionscript)? : adobe flex action script
What are the config files used for connecting java and flex?