Using 9-slice properties
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="white">
<mx:Style>
.styledButton
{
upSkin: Embed("logo.png",scaleGridLeft="5",scaleGridRight="194",scaleGridTop="5",scaleGridBottom="31");
downSkin: Embed("logo.png",scaleGridLeft="5",scaleGridRight="194",scaleGridTop="5",scaleGridBottom="31");
overSkin: Embed("logo.png",scaleGridLeft="5",scaleGridRight="194",scaleGridTop="5",scaleGridBottom="31");
}
</mx:Style>
<mx:Button label="My Skinned Button" styleName="styledButton"/>
</mx:Application>
Related examples in the same category