Hi.
As we need to create a small set of components I digged into mx.controls,
mx.core, etc. to understand the exact and proper way of MM for creating their
components.
There are many examples of creating components but as there are many ways to
create such, most of them are very creative and even exotic :-)
I am trying to use the MM way and logic for Flash components and combining
them with the same way to create Flex 2/AS3 components.
Well, I am stuck. I went to check all the things needed to create a checkbox
similar to mx.controls.CheckBox one. The MCs used for the different icon states
(over, up, down, disabled, etc. are into the library and the proper linkages
are assigned.
But through the whole chain of creating a CheckBox (CheckBox ->Button
->SimpleButton -> UIComponent -> UIObject -> MovieClip) I couldn't find in any
place a way how they assign these movieclips visually. As far as I know there
is only one and one only way to assign a library MC object at runtime - using
attachMovie(). I couldn't see any of this in their code.
Somehow it comes from the styling functions and they are assigned
automatically, but HOW?
Does someone know a similar way/example for creating a component the way MM is
using and do I miss something in the code?
Any ideas?
Thanks,
Dimitar