开发者

Flex 3 get values from HTTPservice method="GET"

i has a question in flex 3 i can't get vars using 开发者_Python百科 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜