How do I use Spark components in Flex if I'm coding a pure Actionscript file? I want to use components like the Checkbox and NumericStepper in my project, but I'm not up to the task of learning MXML
It seems that the addChild function doesn't add those components to the parent.
Is your parent container a Flex control too? If so, then Flex componens are added using the .addElement() method of the parent. The parent needs to descend from the Group component to have this method, e.g. an Application, a View or similar. Info here:
Adding Flex components to a plain MovieClip in Flash CS5.5 is a lot more complicated, because Flex does a lot of work behind the scenes that you'd have to take over. Info here, esp. in the comments:
MXML is actually quite easy once the penny drops, especially if you already know Flash/AS3, and makes a lot of things much siimpler and quicker to implement.