Can I dynamically instantiate a webservice or httpservice in actionscript? : adobe flex action script



Can I dynamically instantiate a webservice or httpservice in actionscript? : adobe flex action scrip..

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

Post New Answer

More Adobe Flex Interview Questions

What is the function of trace? : adobe flex action script

1 Answers  


How do we call javascript from flex actionscript?

1 Answers  


Explain prevent default method?

1 Answers  


How do we identify a component created in a repeater using flex?

1 Answers  


Explain the arguments of addeventlistener() method?

1 Answers  


What is over loading? Is method over loading possible in flex?

1 Answers  


Why are the columns in my datagrid in some strange order? : adobe flex action script

1 Answers  


What is the difference between sealed class and dynamic classes in flex?

1 Answers  


What is adapter in blaze ds?

1 Answers  


What is display container?

1 Answers  


Where can I download flex 3 beta 3?

1 Answers  


Explain about cairngorm architecture?

1 Answers  


Categories