Use getStyleDeclaration() to apply the styles with the global selector
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp(event)">
<mx:Script>
public function initApp(e:Event):void {
StyleManager.getStyleDeclaration("global").setStyle("fontSize", 22);
StyleManager.getStyleDeclaration("global").setStyle("textDecoration", "underline");
}
</mx:Script>
<mx:Button id="myButton" label="Click Here" />
<mx:Label id="myLabel" text="This is a label" />
</mx:Application>
Related examples in the same category