I want a combo box and when user selects one option, the whole application changes including the components. It’s mainly going to be colour, so I want to know how I can change the colour settings of the components. I tried via styleManager but it’s not doing anything:
private function comboHandler(event:Event):void
{
var myData:Number = event.currentTarget.selectedItem.data;
if (myData == 1) {
applySkin(standardFormat,0x99FF33,0x99FF33);
}
if (myData == 2) {
applySkin(headingFormat,0xFF3399,0xFF3399);
}
}
function applySkin(myTextFormat:TextFormat,componentBG:uint,componentFontCol:uint)
{
StyleManager.setStyle("textFormat", myTextFormat);
StyleManager.setStyle("backgroundColor",componentBG);
StyleManager.setStyle("color",componentFontCol);
StyleManager.setStyle("backgroundColor",componentFontCol);
}