0

I would like to compile my view classes into an SWC from flash, and compile the rest of the application using mxmlc (avoiding recompiling through the IDE). However, because the view classes (source) are in the project class path, mxmlc gives them precedence over the compiled SWC.

Now I'm thinking that maybe the view classes have to be separated into a separate project, but I am hesitant to do so because I don't think these classes truly constitute an independent project, and separating them out would not serve any purpose beyond working around the linking precedence problem. Furthermore, if i were to change my mind about the linkage, i would have to restructure both projects, and any common dependancies between the two projects could be messy to maintain.

How can I get mxmlc to give precedence to the SWC over the Actionscript? Or, if this is not possible, is it more common to create a separate project for the Flash-compiled library, or to isolate the Flash source in the project so that it is not included in the project class path?

4

1 回答 1

0

更常见的是为Flash编译的库创建一个单独的项目,还是在项目中隔离Flash源使其不包含在项目类路径中?

一个并不比另一个更常见。这取决于您要达到的目标。例如,我经常下载有用的库(补间、jpeg 编码等)并将它们全部放入库目录中。然后我只是将它们作为额外的来源。

我还有一个个人库,我在几个项目中使用它,它是它自己的 Flex 项目,我作为 SWC 链接。

我怀疑我是否想在同一个项目中分开类。

还有其他几种方法可以从 mxmlc 中排除文件。本文展示了一种使用编译器选项的方法-link-report-load-externs并且看起来非常聪明。因此,如果您愿意手工制作自己的 xml 排除文件,那么-load-externs也可以为您工作。

允许您省略符号的其他编译器选项包括:-externs-compiler.external-library-path.

于 2010-06-22T16:53:40.543 回答