Style Flex



    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark"
    creationComplete="initApp()">
    
        @namespace s "library://ns.adobe.com/flex/spark"; 
        s|Button {
            color: #66CCFF; 
        }
    

     
        [Bindable] 
        private var n:Number; 
        private function initApp():void { 
            n = myButton.getStyle("color"); 
        } 
        public function changeStyles(e:Event):void { 
            if (myButton.getStyle("color").toString(16) == "ff0000") { 
                myButton.setStyle("color", 0x66CCFF); 
            } else { 
                myButton.setStyle("color", "Red"); 
            } 
            n = myButton.getStyle("color"); // Returns 16711680 
        } 
      

    
                    click="changeStyles(event)" />