【发布时间】:2011-02-17 17:52:35
【问题描述】:
我的 flex 客户端应用程序存在严重问题。 我有一个带有 php web 服务的 apache 服务器。 flex 客户端发出一个 httpservice 请求。 我注意到从应用程序的 creationComplete 事件运行的 httpservice 请求并不总是从服务器获取数据。 但从用户操作调用的 HTTP 服务请求始终有效。
我还注意到,当我直接从 Flex Builder 3 运行 flex 客户端应用程序而不将其上传到服务器时,问题发生的频率较低。
在应用程序中:
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();
}
【问题讨论】:
-
格式化您的代码以提高可读性。我们在这里为您提供帮助,但我们很难阅读它。
标签: php apache-flex flash apache httpservice