flashapache-flexactionscriptmxmlc

Flex compiler omitting classes


I noticed that the resulting swf file of an mxmlc compilation is missing classes that are not used but still given to the compiler via the -source-path option.

How can this be avoided?

Also, how does the compiler find out which classes are not used?


Solution

  • If you want the unused classes to be included, using an import on those classes should be sufficient. Make sure you include the import in a class that is being used.

    Add the compiler flag "link-report filename" generates a report to see what classes are included.