I have created a super-simple Flash Component, -just a Button and TextArea together. These are both placed in 'assets' layer frame 2, with avatar in Frame 1, etc, and tied this to an ActionScript3 class, TestComponent.
When I use this component, in say, Tester.fla, I get the following error,
TestComponent1 Constructor called TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/addChildAt() at fl.controls::BaseButton/drawBackground() at fl.controls::LabelButton/draw() at fl.controls::Button/draw() at fl.core::UIComponent/callLaterDispatcher()
If I include the 'Button' in Tester.fla library, the error goes away. But I don't have to do this for the TestArea.
It appears that 'Button' need special treatment in Flash. I have seen this question asked several times before in different ways, and never answered.
I would appreciate some explanation for this strange behavior, or if I designed my TestComponent incorrectly, then please advise on the correct design.