I've created a .fla document that contains a lot of code that semi-automates the production of simple swf files for Flash beginners. Depending on the way a particular file is set up only a small portion of the total code is needed for each ad with the rest being superfluous. I'd like to know if there is a way for movie clips containing code to be both linked in the library so they can be accessed if required but also purgable or ignored (not loaded) if they are not.
As I understand it, items linked in the Library are always included in the final .swf file in case there is a code request for the item to be placed on the Stage etc. I'd like to split the considerable amount of total code into separate modules contained in a number of Library movie clips, with only the few required for a particular ad being included in the .swf file, with the rest discarded or ignored. As the people using the .fla file are not savvy with code I'd like to include code that does this automatically - is this possible?
I realise that using externally loaded swf files would also work, but want to avoid this method if possible to keep the final .swf files as robust and self-contained as possible. This is required to release the memory overhead of having unused linked items loaded into the final .swf file when it is created.
Any ideas or advice would be gratefully received.