【发布时间】:2010-06-20 11:49:57
【问题描述】:
我正在尝试使用 Flex4 SDK 编译现有的 Flex3 项目。我收到此错误:
Warning: This compilation unit did not have a factoryClass specified in Frame metadata to load the configured runtime shared libraries. To compile without runtime shared libraries either set the -static-link-runtime-shared-libraries option to true or remove the -runtime-shared-libraries option.
生成的文件与我旧的 Flex3 编译的 .swf 文件大致相同。在 Flash Player 中播放生成的 .swf 文件也会出现以下错误:
An Actionscript error ocurred: VerifyError: Error #1014: Class spark.core::SpriteVisualElement could not be found
如果我将编译器属性static-link-runtime-shared-libraries 设置为true,那么错误就会消失,一切都很好。但是,生成的 .SWF 的大小要大几倍。这不是我想要的。
我不完全理解运行时共享库的概念,但似乎将静态链接选项设置为 true,这些库包含在 .swf 中。但是,我喜欢将它们从 .swf 中排除,只在运行时加载所需的库,因为我的项目似乎与 Flex3 相关(顺便说一下,我不知道)。
如果我理解正确,playerglobal.swc 应该包含我的 .swf 必须加载的外部库的所有必要代码。 Flex4 编译文件是否需要更多库?我应该对 Frame 元数据标签中的 factoryClass 做些什么吗?
我想我的问题归结为:如何编译与我之前的 Flex3 编译的 .swf 大小相同的 Flex4 .swf?
【问题讨论】:
-
我不清楚您是否只想编译 flex3 项目,或者您实际上想要包含一些新的/更新的 flex4 功能。另外:你是在命令行编译还是使用 flex builder / fdt?
-
我需要先重新编译 Flex3 项目,然后可能会添加一些 Flex4 功能。但是编译 Flex3 项目是我的首要任务。我在命令行上使用 mxmlc 进行编译。我的项目包含多个 .as 文件。
-
我假设“path.to.your.preloader”标识了某个类,对吧? Adobe 是否已经为在找到主 .swf 的同一位置找到共享库的常见情况编写了任何类?
标签: apache-flex flash flex4 actionscript-3 mxmlc