I need know how to get around including components in libraries of SWF’s that don’t need them using Flash CS3. For example:
I have two SWF’s. The first one uses the Button component, and I add the Button dynamically using ActionScript. The second SWF loads the first SWF at runtime, and therefore I reference the class that references the Button component. However, this second SWF doesn’t use the Button component directly. When I try and compile this SWF, I get:
1046: Type was not found or was not a compile-time constant: Button.
Obviously, I can fix this problem by dragging the Button component into both SWF’s, but this only increases the size of my second SWF when it’s not really needed. So I’m looking for a way to avoid including the Button component where it’s not needed.