Using the setStyle() method to apply graphical skins
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="init();">
<mx:Script>
[Embed("a.gif")]
public var os:Class;
[Embed("b.gif")]
public var ds:Class;
[Embed("a.gif")]
public var us:Class;
private function init():void {
b1.setStyle("upSkin", us);
b1.setStyle("overSkin", os);
b1.setStyle("downSkin", ds);
}
</mx:Script>
<mx:Button label="Click Me" id="b1"/>
</mx:Application>
Related examples in the same category