as3httpclient 的 Flex 编译问题

问题描述 投票:0回答:1

我在使 Flex 应用程序(使用 as3httpclient)工作时遇到问题。 我编译了它(compc -load-config=build-swc.xml),将 as3httpclientlib-1_0_6.swc 放入我的 libs 目录中,然后运行

mxmlc -compiler.include-libraries lib/as3crypto-1_3_patched.swc 
lib/as3httpclientlib-1_0_6.swc lib/corelib.swc -- App.mxml

在我的动作脚本中我

import org.httpclient.HttpClient;

但我仍然收到错误

Error: Type was not found or was not a compile-time constant: HttpStatusEvent
client.listener.onStatus = function(event:HttpStatusEvent):void {

... 。有什么想法吗?

btw / 在编译“compc -load-config=build-swc.xml”之前我不得不 改变

  <path-element>${flexlib}/libs/player/9/playerglobal.swc</path-element>

  <path-element>${flexlib}/libs/player/10.0/playerglobal.swc</path-element>

为了编译它,因为我的 Flex 版本没有适用于 Flash 9. 8o 的playerglobal.swc

actionscript-3 apache-flex mxmlc
1个回答
0
投票

除非这是自定义类,否则不存在 HttpStatusEvent 这样的东西,您需要导入 flash.events.HTTPStatusEvent 并引用它。

© www.soinside.com 2019 - 2024. All rights reserved.