views:

10

answers:

1

Hi.

i has a question in flex 3 i can't get vars using HTTPservice method="GET"

in the code:

<mx:HTTPService id="variables" method="GET"  request="var1,var2" resultFormat="text"/>
private function init():void{
 variables.send();
 Alert.show(variables.lastResult.toString());
} 

when using this url:

bin-debug/conectado.html?var1=hello&var2=world

Thanks for your help.

A: 

If you send your HTTP-Service you can't expect to receive a result immediately as server-client communication with Flex is asynchronous. You need to specifiy an event handler to your HTTP-Service which will listen for the result event. In this handler you have access to the result.

hering

related questions