Search code examples
actionscript-3flashmxmlcswc

MXMLC compiling multiple SWFS with SWC dependancies


So I have a project comprised of multiple modules and I'm trying to work out the best way to compile, with minimal code duplication.

I have a core Framework SWF and a number of sub applications which are independent of core. In addition I have a series of common library SWCS which core and subapps are dependant on.

I'm not sure the best way to compile this project so that each module does not need to include the libraries as this would duplicate code. Would love some advice!

I started out with using external-library-path for compilation, but something is going to have to include the common libraries.

Thanks


Solution

  • As I understand, your core application contains modulemanager, which loads your subapps (modules), right?
    In this case you can include your commons swc into your main applcation by using include-libraries parameter, and for the subapps use external-library-path. So, all classes from commons will be included into main app, and when subapps are loaded, they will use them.
    You can also use your commons as RSL instead of including them into application.