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 the function of trace? : adobe flex action script
How do we call javascript from flex actionscript?
Explain prevent default method?
How do we identify a component created in a repeater using flex?
Explain the arguments of addeventlistener() method?
What is over loading? Is method over loading possible in flex?
Why are the columns in my datagrid in some strange order? : adobe flex action script
What is the difference between sealed class and dynamic classes in flex?
What is adapter in blaze ds?
What is display container?
Where can I download flex 3 beta 3?
Explain about cairngorm architecture?