<?xml version="1.0" encoding="utf-8"?> <mx:Application name="CheckBox_color_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white" viewSourceURL="srcview/index.html"> <mx:Style> CheckBox { fontWeight: bold; iconColor: green; } .selectedStyle { color: green; textRollOverColor: green; textSelectedColor: green; themeColor: green; } .unselectedStyle { color: red; textRollOverColor: red; textSelectedColor: red; themeColor: red; } </mx:Style> <mx:Script> <![CDATA[ private function checkBox_change(evt:Event):void { var tgt:CheckBox = evt.currentTarget as CheckBox; if (tgt.selected) { tgt.styleName = "selectedStyle"; } else { tgt.styleName = "unselectedStyle"; } } ]]> </mx:Script> <mx:CheckBox id="checkBox" label="CheckBox" selected="false" styleName="unselectedStyle" change="checkBox_change(event);" /> </mx:Application>