0

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.

ketan
  • 19,129
  • 42
  • 60
  • 98
Edbrik
  • 91
  • 3

1 Answers1

1

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
  • 1,956
  • 4
  • 28
  • 43