Use StyleManager to apply styles to all classes or specified classes
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()">
<mx:Script>
public function initApp():void {
StyleManager.getStyleDeclaration("Button").setStyle("fontSize",15);
StyleManager.getStyleDeclaration("Button").setStyle("color",0x9933FF);
}
</mx:Script>
<mx:Button id="myButton" label="Click Here" />
</mx:Application>
Related examples in the same category