 <p>For a project I did once, we used a ruby script to generate an AS file containing references to all classes in a certain package (ensuring that they were included in the compilation). It's really easy considering that flash only allows classes with the same name as the file it's in, so no parsing of actual code needed.</p> <p>It would be trivial to also make that add an entry to a dictionary (or something similar), for a factory class to use later.</p> <p>I believe it's possible to have a program execute before compilation (at least in flashdevelop), so it would not add any manual work.</p> <p>Edit: I added a basic FlashDevelop project to demonstrate. It requires that you have ruby installed. <a href="http://dl.dropbox.com/u/340238/share/AutoGen.zip" rel="nofollow">http://dl.dropbox.com/u/340238/share/AutoGen.zip</a></p>