Hi FlexCoders,

Needing your input on the following:

I have created a function for the dragevent of a list.

Code is as follows:

private function myFunction(evt:DragEvent):void
{
 var nameID:String = 'Angelo';
 
 // Call a webservice operation here
 ws.GetStatus(nameID);
 
 Alert.show(String(_xmlGetStatus), 'myFunction');
 
 // I need to use the _xmlGetStatus here...
 // But the _xmlGetStatus is NULL?
 // Although in the Result Handler, it is not NULL.
}

private function getStatusResultHandler(event:ResultEvent) :void
{
 _xmlGetStatus = XML(event.result);
 Alert.show(String(_xmlGetStatus), 'getStatusResultHandler');
}

The result handler for the GetStatus web service operation populates an XML 
variable which I declared on top of the script (i.e. private var 
_xmlGetStatus:XML;).

When I run my application, myFunction executes but the alert that is shown 
first is the one in the function myFunction, instead of the one in the result 
handler.

I need to use the values in the XML variable _xmlGetStatus for further 
operations in function myFunction, but then the value is not populated right 
away.

Any way to handle this?

Thanks and regards,
Angelo


      

Reply via email to