flex4 - Flex 4 无法识别 flash.events.Uncaught 错误事件

标签 flex4 flexbuilder

测试.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 构建路径显示:

弹性 4.0

  1. playerglobal.swc
  2. 文本布局.swc
  3. osmf.swc
  4. 框架.swc
  5. Spark .swc
  6. Spark 皮.swc
  7. rpc.swc
  8. 数据可视化.swc
  9. flash-integration.swc
  10. flex.swc
  11. 实用程序.swc

有什么想法吗?

最佳答案

您需要 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 不支持此功能。

关于flex4 - Flex 4 无法识别 flash.events.Uncaught 错误事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4053581/

相关文章:

apache-flex - 通过FlexBuilder和mxmlc构建swf的区别(ANT构建)

apache-flex - 是否可以在 Flash Builder bin-debug 中嵌套文件夹

apache-flex - 安装 Flex builder 后,Ubuntu 10 上的 Flash 播放器无法正常工作

ios - Flex Mobile 4.6 应用程序不会在 IOS 上创建数据库?

apache-flex - 将 CSS 文件中的 ClassReference 编译到 Swf 文件时找不到定义错误

css - 你知道这个奇怪的事情吗? "AS3, Button width cannot change by setStyle(). However, inline CSS can change width."

apache-flex - Flex 4 IntelliJ IDEA 包装器 html 崩溃浏览器

actionscript-3 - 来自 AIR 应用程序的电话调用

eclipse - 是否可以使用环境变量代替 "linked resource"?

apache-flex - 将 Ant 与 FlexBuilder 一起使用