欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

flex中如何用图像给按钮做皮肤

程序员文章站 2022-03-07 18:49:13
复制代码 代码如下:
复制代码 代码如下:

<?xml version="1.0" encoding="utf-8"?>

<s:sparkbuttonskin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
minwidth="42" minheight="30"
alpha.disabled="0.5">

<fx:metadata>
<![cdata[
/**
* @copy spark.skins.spark.applicationskin#hostcomponent
*/
[hostcomponent("spark.components.button")]
]]>
</fx:metadata>
<fx:declarations>

</fx:declarations>

<!-- states -->
<s:states>
<s:state name="up" />
<s:state name="over" />
<s:state name="down" />
<s:state name="disabled" />
</s:states>
<s:rect left="0" right="0" top="0" bottom="0">
<s:fill>
<s:bitmapfill source.up="@embed('images/1_130927114244_1.png')" smooth="true" fillmode="scale"/>
</s:fill>
</s:rect>

</s:sparkbuttonskin>