I ran into some odd problems with our custom components today. I had a set of components and when I included one component and used it everything was fine but when I included a second related component the first stopped working. Similar things happenned if I had the SWCs marked as export in first frame, which is set to on by default when you drag in a SWC from the component panel. With everything turned on some didn’t work, but with only some turned on they did.
With a little help from ASV Chafic was able to identify the problem as being related to extra symbols in the component SWFs (the ones inside the SWCs). Some components had symbols in there that they didn’t use. It turned out this was because in the original source FLA from which I created the SWCs, some random symbols had Export in First Frame checked (which is default when you set something to Export for ActionScript).
With this checked the symbols were included in the SWF even though they weren’t used by the component. Then when another component was used that did need these symbols, they weren’t imported properly.
So, to summarize this long story in one short sentence: Make sure nothing has “Export in First Frame” checked when creating components in Flash MX 2004.