Flex 4 无法识别 flash.events.UncaughtErrorEvent
test.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" x="0" y="0" width="703" height="609" xmlns:ns1="*" >
<mx:Script>
<![CDATA[
import flash.events.*;
// stuff
private function onUncaughtError(e:UncaughtErrorEvent):void {
//Do Stuff
}
这给出: apitester.mxml 1046:未找到类型或不是编译时常量:UncaughtErrorEvent。 /apitester/src 第 35 行 Flex 问题,
根据 Adobe 它有 Flex 和 Air 两种版本。
Flex 4/Eclipse 构建路径
Flex
- 4.0playerglobal.swc
- textLayout.swc
- osmf.swcframework.swcspark.swcsparkskins.swcrpc.swcdatavisualization.swcflash
- 什么
- 想法
- 显示
- :
- ?
- -
- integration.swcflex.swcutilities.swc
- 有
吗
test.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" x="0" y="0" width="703" height="609" xmlns:ns1="*" >
<mx:Script>
<![CDATA[
import flash.events.*;
// stuff
private function onUncaughtError(e:UncaughtErrorEvent):void {
//Do Stuff
}
This gives:
apitester.mxml 1046: Type was not found or was not a compile-time constant: UncaughtErrorEvent. /apitester/src line 35 Flex Problem
According to Adobe it is available in flex and Air.
The Flex 4/Eclipse build path shows:
Flex 4.0
- playerglobal.swc
- textLayout.swc
- osmf.swc
- framework.swc
- spark.swc
- sparkskins.swc
- rpc.swc
- datavisualisation.swc
- flash-integration.swc
- flex.swc
- utilities.swc
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要 Flex 4.1 SDK。
请参阅:http://flassari.is/ 2010/06/global-error-handling-with-flash-player-10-1/
此外,您还需要向 Flex 编译器指定您需要 Flash Player 10.1(不是 SDK 所需的最低版本)是 10.0),因为早期版本的 Flash Player 不支持此功能。
You need the Flex 4.1 SDK.
See: http://flassari.is/2010/06/global-error-handling-with-flash-player-10-1/
Also you need to specify to the flex compiler that you are require flash player 10.1 (not the minimum version required by the SDK which is 10.0) because earlier versions of the flash player do not support this.
您只需将 Flex SDK 4.1/frameworks/libs/player/10.1 中的playerglobal.swc 添加到您的构建路径即可。当您这样做时,您必须删除与原始框架playerglobal.swc的链接
You can simply add the playerglobal.swc from Flex SDK 4.1/frameworks/libs/player/10.1 to your build path. When you do so, you have to remove the linkage to the original framework playerglobal.swc