Set button font style to italic with setStyle

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="initializeHandler(event)">
<mx:Script>
private function initializeHandler(event:Event):void {
button.setStyle("fontStyle", "italic");
}
</mx:Script>
<mx:Button id="button" label="Example" color="green" />
</mx:Application>
Related examples in the same category