为组件嵌入图片(修改)
来源:互联网 发布:熊猫人之谜音乐知乎 编辑:程序博客网 时间:2024/06/05 04:21
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Style>
Application{
fontSize:12;
backgroundColor:#AEB4E6;
}
.btn{
/* P252 */
overSkin:Embed("skin/btn_over.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16"); /*在style中嵌入图片*/
upSkin:Embed("skin/btn_up.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16");
downSkin:Embed("skin/btn_down.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16");
}
.linkBtn{
overSkin:Embed("skin/btn_over.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16");
upSkin:Embed("skin/btn_up.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16");
}
</mx:Style>
<mx:Script>
<![CDATA[
[Embed(source="skin/btn_up.gif")]
[Bindable]
private var myImg:Class;
]]>
</mx:Script>
<mx:Button x="33" y="25" label="修改后的按钮" styleName="btn"/>
<mx:Button x="33" y="66" label="修改前的按钮"/>
<mx:LinkButton x="33" y="178" label="修改后的linkButton" styleName="linkBtn"/>
<mx:LinkButton x="33" y="253" label="没有修改的LinkButton"/>
<mx:Button x="33" y="113" label="在MXML中嵌入图片" upSkin="@Embed(source='skin/btn_over.gif')"/>
<mx:Button x="370" y="26" label="在ActionScript中嵌入图片元素" upSkin="{myImg}"/>
<!-- 在MXML中,upSkin="@Embed(source='skin/btn_over.gif')"如此添加图片 -->
<!-- 在CSS和MXML中嵌入图片时,Flex编译器自动将图片转化为可视化对象类型,成为mx.core.BitmapAsset的子类。当使用ActionScript嵌入图片时,还可以制定这个对象的名称,用来代替嵌入的图片 -->
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Style>
Application{
fontSize:12;
backgroundColor:#AEB4E6;
}
.btn{
/* P252 */
overSkin:Embed("skin/btn_over.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16"); /*在style中嵌入图片*/
upSkin:Embed("skin/btn_up.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16");
downSkin:Embed("skin/btn_down.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16");
}
.linkBtn{
overSkin:Embed("skin/btn_over.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16");
upSkin:Embed("skin/btn_up.gif",scaleGridTop="4",scaleGridBottom="16",scaleGridLeft="4",scaleGridRight="16");
}
</mx:Style>
<mx:Script>
<![CDATA[
[Embed(source="skin/btn_up.gif")]
[Bindable]
private var myImg:Class;
]]>
</mx:Script>
<mx:Button x="33" y="25" label="修改后的按钮" styleName="btn"/>
<mx:Button x="33" y="66" label="修改前的按钮"/>
<mx:LinkButton x="33" y="178" label="修改后的linkButton" styleName="linkBtn"/>
<mx:LinkButton x="33" y="253" label="没有修改的LinkButton"/>
<mx:Button x="33" y="113" label="在MXML中嵌入图片" upSkin="@Embed(source='skin/btn_over.gif')"/>
<mx:Button x="370" y="26" label="在ActionScript中嵌入图片元素" upSkin="{myImg}"/>
<!-- 在MXML中,upSkin="@Embed(source='skin/btn_over.gif')"如此添加图片 -->
<!-- 在CSS和MXML中嵌入图片时,Flex编译器自动将图片转化为可视化对象类型,成为mx.core.BitmapAsset的子类。当使用ActionScript嵌入图片时,还可以制定这个对象的名称,用来代替嵌入的图片 -->
</mx:Application>
- 为组件嵌入图片(修改)
- 在组件是嵌入图片
- Accordion(导航嵌入图片)
- IDEA 修改背景为图片
- 把图片修改为单色图片
- java 将组件保存为图片
- 导出Flex组件为jpg图片
- 使用AspJpeg组件为图片添加透明水印图片
- Flex导出组件、图片或amchart统计图为图片
- 网页修改鼠标样式为图片
- DLL嵌入图片资源
- 嵌入图片或swf
- 发送邮件嵌入图片
- org mode 嵌入图片
- 5 嵌入图片
- 图片嵌入html
- Flex中的嵌入图片
- 7嵌入图片
- 如何在IBM JDK 1.4.2的环境中避免Java堆空间的碎片问题
- 人道 --------转自CJCHT CLARE的NEWS文章
- 诺博NB1200+ 路由器解决网吧ARP病毒
- 解决windows server 2003上不支持.流式flv的问题
- JTabl的简单使用
- 为组件嵌入图片(修改)
- Delphi实现串口编程收发短信
- 使用 timeit 模块
- 虚拟机下共享文件夹的设定
- Oracle-关于DBW0、Server Process与数据文件的两个常见误解
- 季刊下
- 命名规范
- 一起向諸葛亮學十堂課 --------转自CJCHT CLARE的NEWS文章
- websphere 进程挂起