Flash XML Exclusion File

I did not even know this existed until recently, but it solved a huge problem.  I like to split up my applications into separate SWF files and then manage them dynamic by loading those sections programmatically.  This creates a problem when reusing classes.  The main SWF might use the same class as one of the section SWF files.  If all the sections were in the same SWF, then this would not be a problem.  But since they are separated, they cannot take advantage of the code reuse.  This can add extra file size to your project.

Well the solution is to use an xml exclusion file. This is a file that exists in the same directory as your FLA. Any file that should be excluded when the SWF is compiled should be placed in the exclusion file. Your SWF will then compile without those classes. Then when you load the SWF into a SWF that already has those classes, the SWF will use the available classes.

You must name the exclusion file with the same name as your FLA with an “_exclude” appended to the end. So if your FLA is named test.fla, then your exclusion file would be test_exclude.xml. The following is an example of an exclusion file:

[xml]

   

[/xml]

Leave a Reply

Your email address will not be published. Required fields are marked *