Talking to some folks about problems in making components and learned a few things. Here’s something you may not know. I didn’t.
When you export a component as a SWC, any and all symbols in that fla’s library that are set to export first frame will be included in that SWC – even if they are not included in the component symbol as assets or ever used by the component at all.
Let’s do a test. Make a movie clip with a simple shape. Export it with a linkage name and a class name. Make a dummy class for it. Export it as a SWC. It should be in the neighborhood of 4k in size.
Now go back to your fla and drag a few UI components onto the stage and delete them. You don’t need to add them to your component or reference them in any way. Don’t change your component at all. Just make sure there is some extra garbage in the library. Export the SWC again. Mine came in at 75k.
Now, go back and select each UI component you added, and change it so it is not exporting on first frame. You’re back to 4k.
I also picked up a copy of ASV today, and with that you can verify that each and every first frame exported symbol definitely takes a ride into the SWC.
Not sure why this happens. It’s not like those symbols are even available for attaching in your final movie. If you don’t include them in your assets layer, they won’t be available, but they still get included. Strange.
Anyway, here are the lessons:
A. make sure nothing is checked for first frame export in an fla where you are developing components, except what you are sure you want to include in every component exported from that fla.
B. This includes other components. If you are developing several components in a single fla, make sure none are checked for first frame export, or each component will include every other one.
C. Alternately, only develop one component per fla, and make sure there is nothing at all in that fla that you don’t want to include in the component.