开发者

Where will Flash look first for a Class definition: in an AS file (source path) or a linked SWC file (library path)?

开发者 https://www.devze.com 2023-01-30 21:23 出处:网络
I want to accelerate the compilation of a large Flash IDE project by pre-compiling some packages or parts of packages into a SWC file, which I will include in the \"Source Path\" section of the Advanc

I want to accelerate the compilation of a large Flash IDE project by pre-compiling some packages or parts of packages into a SWC file, which I will include in the "Source Path" section of the Advanced AS3 Settings under Flash Publish Settings.

The problem is that I don't know where the compiler will look first for a class definition, given that it should (in theory) be able to find a class definition in both the SWC and the source path, since the source of the SWC is in the source path (i.e. the main FLA and the linked SWC share the same source path or root directory).

While you can arrange the order for source paths (paths including AS files), and you can arrange the order of library paths (paths to SWC files or folders containing SWC files), you cannot specify whether source paths or library paths are searched for definitions first.

Will the class definition in the library path (AS file) or the source path (SWC file) be used? Even though they may represent the same class definition, I will not see my compilation times decrease unless it uses the SWC file.

Edit: The only documentation I've found says "If you use the Library path, be sure none of the compiled code in the SWC files is duplicated in uncompiled AS files in th开发者_StackOverflow社区e Source path. The redundant code will slow down compilation of your SWF file." I love how it mentions the performance hit without mentioning which definition will actually be used :P


The AS file is the last part the complier look for. So AS file will override the class in swc library.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号