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

编程学习 2021-07-05 11:32www.dzhlxh.cn编程入门
用图像给按钮做皮肤在flex中实现是很容易的,狼蚁网站SEO优化有个不错的示例,大家不妨参考下,或许会有所帮助
代码如下:

<?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>

Copyright © 2016-2025 www.dzhlxh.cn 金源码 版权所有 Power by

网站模板下载|网络推广|微博营销|seo优化|视频营销|网络营销|微信营销|网站建设|织梦模板|小程序模板