Hi
I have an instance on the stage of a combo box called cb1 I want to alter the formatting of it. I have gone into the library and copied the ComboBox_upSkin mc and called it upSkinBlue, set its class to upSkinBlue, exported it for action script.
Here’s my complete action script:
import fl.controls.ComboBox;
cb1.setStyle("upSkin","upSkinBlue");
cb1.addItem({label:"Apples"});
cb1.addItem({label:"Oranges"});
cb1.addItem({label:"Banana"});
cb2.addItem({label:"Spinach"});
cb2.addItem({label:"Salad"});
cb2.addItem({label:"Cucumber"});
When I run I get this error:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/drawBackground()
at fl.controls::BaseButton/draw()
at fl.core::UIComponent/drawNow()
at fl.controls::ComboBox/drawLayout()
at fl.controls::ComboBox/draw()
at fl.core::UIComponent/callLaterDispatcher()
guess I am doing something wrong, but can’t work out what. If you’re interested I a using a tutorial here - scroll down to "Changing AS3 component styles with AS.
Any pointers very greatfully received - I attach a ss of my library and the “upSkinBlue” in case i am missing something there