Posted this on Flashcoders, no solution yet.
I have a component that I created, not based on UIComponent. Class is com.bit101.controls.Button.
I export the swc and give it to someone else who does not have my classes. It works fine. They can even use data typing with it, and import my Button class, as long as it is set to export first frame.
If they turn off export first frame, even if there is an instance of the clip on stage, the classes aren’t available to the compiler for importing or checking. The component continues to work just fine. It can see its own classes.
I’ve messed around with export frames for classes, preloading schemes, just about everything else I can think of. It seems that if I distribute a component without the source code, the user must export it first frame to access data typing on its classes.
I may have to resort to creating an intrinsic class file and distributing that with the component, but the thing that bugs me is that it works if it’s first frame export, meaning that the class data is there in the swc and available to the fla. I feel there has to be a way to access it at some point even if it’s not expoted first frame.
Any ideas?