xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="initApp()">
public function initApp():void {
styleManager.getStyleDeclaration("spark.components.Button").setStyle("color","Blue");
}
public function changeStyles(e:Event):void {
// Check against "255" here, because that is the numeric value of "Blue".
if (e.currentTarget.getStyle("color") == 255) {
e.currentTarget.setStyle("color", "Red");
} else {
e.currentTarget.setStyle("color", "Blue");
}
}
click="changeStyles(event)" />