Embedding three images and applies those images as skins to an instance of a Button control
<!-- skins/EmbedWithSetStyle.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
initialize="init();">
<fx:Script>
[Embed("a.gif")]
public var os:Class;
[Embed("a.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);
}
</fx:Script>
<mx:Button label="Click Me" id="b1" />
</s:Application>