Here’s and example of our Library & LibraryManager classes that we use in some of our Flex and AS 3.0 projects to manage our external assets stored in SWF’s.
The classes enabled you to create multiple libraries of embedded (retaining and giving access to code) or loaded SWF’s.
You can create instance of Library wherever you want, but you can also create them through the LibraryManager giving you a single class to gain access to all your Library instances.
Here’s a quick example creating 2 Library instances using the LibraryManager. Each Library contains 2 SWF’s, each containing a BitmapData and MovieClip which are created using the Library. One Library instance embeds the SWF’s the other loads them. Not shown in the example, but you can also have a mix of loaded and embedded SWF’s in the same Library, and they contain fonts as well as custom classes.
You can obviously get it one our Google Code repository.