Mega Code Archive
 
 
    
Using getStyle() and setStyle() methods to change the Buttons fontSize style and display the new size in the TextInput
     
        [Bindable] 
        private var curSize:int = 10; 
        private function initApp():void { 
            ip1.setStyle("fontSize", curSize); 
            b1.setStyle("fontSize", curSize); 
            b2.setStyle("fontSize", curSize); 
        } 
        public function showStyles():void { 
            mx.controls.Alert.show("Font size is " + ip1.getStyle("fontSize") + "."); 
        } 
        public function setNewStyles():void { 
            curSize = Number(ip2.text); 
            ip1.setStyle("fontSize", curSize); 
            b1.setStyle("fontSize", curSize); 
            b2.setStyle("fontSize", curSize); 
        }