I have an actionscript project in Flex (actually FlashBuilder beta - but I am happy to use Flex 3 if I need to).
It contains two application files. One is a main application the other is a class library swf (not swc) (with media player classes in it) that will be loaded into the main application's primary applicationDomain.
I want to exclude the media player classes from the main app as it compiles, to keep the file size small.
I know 2 ways to do this:
1) by using an SWC file which contains those classes - (although it will be tricky to have that not include the common classes that it extends) - however that will have to be a separate library project for each of these external class library swfs I build (and I will be making many).
2) Another way is to use the -load-externs argument in the compiler - but that will apply to all applications in the project - so you would constantly have to change that as you compile one application and then another. Which would be tricky to manage as it scale to include many application files.
Another approach would be to use modules - would that work? How does the main application know not to compile classes that are imported in a module? Also I was disapointed that I couldn't control where the module swfs were published.
How do people organize their projects such that they can easily exclude classes from compiling in some applications but not others within a single Actionscript project? Or do people just end up making multiple projects and library projects to get around this?
What would be ideal is some sort of instruction like [exclude] before the import statement for a class in any file!