Flex 4 无法识别 flash.events.UncaughtErrorEvent

发布于 2024-09-29 14:26:30 字数 977 浏览 0 评论 0原文

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

  1. 4.0playerglobal.swc
  2. textLayout.swc
  3. osmf.swcframework.swcspark.swcsparkskins.swcrpc.swcdatavisualization.swcflash
  4. 什么
  5. 想法
  6. 显示
  7. -
  8. 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

  1. playerglobal.swc
  2. textLayout.swc
  3. osmf.swc
  4. framework.swc
  5. spark.swc
  6. sparkskins.swc
  7. rpc.swc
  8. datavisualisation.swc
  9. flash-integration.swc
  10. flex.swc
  11. utilities.swc

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凉薄对峙 2024-10-06 14:26:30

您需要 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.

把人绕傻吧 2024-10-06 14:26:30

您只需将 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文