我正在尝试使用 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?