与FLEX4 SDK编译SDK

2023-09-08 13:19:02 作者:薄荷再凉不及我心

我想编译现有FLEX3项目的FLEX4 SDK。我得到这个错误:

I'm trying to compile an existing Flex3 project with the Flex4 SDK. I'm getting this error:

警告:该编译单元没有在框架中的元数据中指定的factoryClass加载配置运行时共享库​​。要在编译时不运行时共享库​​或者设置-static链接,运行时共享库​​选项设置为true或删除-runtime,共享库的选择。

生成的文件大致相同,我的老FLEX3编译.swf文件。播放的Flash播放器生成的SWF文件还给出了以下错误:

The resulting file is roughly the same as my old Flex3 compiled .swf file. Playing the resulting .swf file in the Flash Player also gives the following errors:

的ActionScript视频时出错:的VerifyError:错误#1014:类spark.core :: SpriteVisualElement找不到

如果我设置编译器属性静态链接,运行时共享库​​为真,那么错误消失,一切都很好。然而,所得到的.SWF的大小是一对夫妇100K的更大的。而这不是我想要的。

If I set the compiler attribute static-link-runtime-shared-libraries to true, then the error disappears and all is well. However, the size of the resulting .SWF is a couple of 100K's bigger. And that's not what I want.

我不完全了解运行时共享库​​的概念,但它似乎与选项静态链接它们设置为true,库都包含在瑞士法郎。不过,我想从.swf文件中排除,只加载所需的库在运行时,为我的项目似乎做FLEX3(我不知道的方式)。

I don't fully understand the concept of runtime shared libraries, but it seems that with the option to statically link them set to true, the libraries are included in the .swf. However, I like to exclude them from the .swf and only load the needed library at runtime, as my project seemed to do with Flex3 (I didn't know that by the way).

如果我理解正确的话,应该的playerglobal.swc容纳所有必要的$ C $下,我的瑞士法郎已加载外部库。做FLEX4编译后的文件需要更多的图书馆?我应该做的事情与factoryClass在帧元数据标签?

If I understand correctly, playerglobal.swc should hold all the necessary code for the external libraries that my .swf has to load. Do Flex4 compiled files need more libraries? Should I do something with the factoryClass in the Frame metadata tag?

我觉得我的问题归结为:?我怎么编译FLEX4瑞士法郎是相同的大小作为我的previous FLEX3编译瑞士法郎

I think my question boils down to this: How do I compile a Flex4 .swf that is the same size as my previous Flex3 compiled .swf?

推荐答案

您必须添加 [帧(factoryClass =path.to.your。preloader)] 主类(你在编译器选项中设置的)。

You have to add [Frame(factoryClass="path.to.your.preloader")] to the main class (the one you set in the compiler options).