Flex Client application - HTTPRequest problem in the initialize function.

Posted by Elad on Stack Overflow See other posts from Stack Overflow or by Elad
Published on 2010-05-10T15:44:10Z Indexed on 2010/05/11 9:24 UTC
Read the original article Hit count: 360

Filed under:
|
|
|
|

Hello all. I have a serious problem in my flex client applications. I have an apache server with php web services. the flex client makes an httpservice requests. I noticed that the httpservice requests that runs from the creationComplete event of the application does not always get data from the server. but HTTPservice requests called from user actions always work.

I also noticed that when I run the flex client application directly from the Flex Builder 3 without upload it to the server, the problem occours less frequently.

in the Application:

mx:Application creationComplete="Init()" verticalScrollPolicy="off" horizontalScrollPolicy="off" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#5d8eb1"

private function Init():void { var http_request:HTTPService = new HTTPService(); http_request.url = "http://"+this.server_name+":"+this.server_port+"/services/client/client_result.php";

http_request.resultFormat = "e4x"; http_request.addEventListener("result",resultFunc);

http_request.send(); http_request.disconnect(); }

© Stack Overflow or respective owner

Related posts about flex

Related posts about flash