主页 > 知识库 > flex动态加载swf皮肤示例代码

flex动态加载swf皮肤示例代码

热门标签:无锡电销外呼系统代理 天津企业外呼系统代理商 车载电话机器人 中山外呼系统中间件 广州ai外呼系统业务 什么行业需要电话机器人 外呼系统号码显示 地图标注多家店 南昌crm外呼系统如何
复制代码 代码如下:

?xml version="1.0" encoding="utf-8"?>
s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
creationComplete="initHandler(event)">
fx:Script>
![CDATA[
import flash.utils.clearTimeout;
import flash.utils.setTimeout;

import mx.events.FlexEvent;
private var styleurl:String="";

private var setTimeout2:uint;
protected function initHandler(event:FlexEvent):void
{
styleurl="style01.swf";
styleManager.loadStyleDeclarations(styleurl,true);
}

protected function t1_clickHandler(event:MouseEvent):void
{
if(styleurl!=null)
{
styleManager.unloadStyleDeclarations(styleurl,true);
}
styleManager.loadStyleDeclarations("style02.swf",true);
styleurl="style02.swf";
}

protected function button1_clickHandler(event:MouseEvent):void
{
setTimeout2 = setTimeout(button1_click,2000);
}

private function button1_click():void
{
if(styleurl!=null)
{
styleManager.unloadStyleDeclarations(styleurl,true);
}
styleManager.loadStyleDeclarations("style03.swf",true);
styleurl="style03.swf";
clearTimeout(setTimeout2);

}

protected function button2_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
if(styleurl!=null)
{
styleManager.unloadStyleDeclarations(styleurl,true);
}
styleManager.loadStyleDeclarations("style01.swf",true);
styleurl="style01.swf";
}

]]>
/fx:Script>
fx:Declarations>
!-- 将非可视元素(例如服务、值对象)放在此处 -->
/fx:Declarations>
s:Panel horizontalCenter="0" y="100" width="422" height="300" title="用户登录">
s:layout>
s:VerticalLayout horizontalAlign="center" verticalAlign="middle" gap="28"/>
/s:layout>
s:HGroup verticalAlign="middle">
s:Label text="用户名"/>
s:TextInput id="t1" styleName="textInput" prompt="请输入用户名"/>
/s:HGroup>
s:HGroup verticalAlign="middle" paddingLeft="20">
s:Label text="密码" id="t2"/>
s:TextInput styleName="textInput" prompt="请输入密码"/>
/s:HGroup>
s:controlBarContent>
s:Button label="小粉红" click="t1_clickHandler(event)" color="0xFF00FF"/>
s:Button label="经典蓝(2秒)" click="button1_clickHandler(event)" color="0x4169E1"/>
s:Button label="青草绿(默认)" click="button2_clickHandler(event)" color="0x00FF00"/>
/s:controlBarContent>
s:controlBarLayout>
s:HorizontalLayout gap="39"/>
/s:controlBarLayout>
/s:Panel>
/s:Application>

复制代码 代码如下:

/* CSS file */
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";

global
{
color:#dc143c;
fontFamily:"微软雅黑";
borderColor:#caff70;
fontSize:20;
borderWeight:3;
}
s|Panel
{
backgroundColor:"#00FF00";
backgroundAlpha:0.3;
}
s|TextInput
{
color:#ff0000;
fontFamily:"微软雅黑";
borderColor:#ffff00;
fontSize:20;
}
s|Button
{
paddingleft:"10";
paddingtop:"5";
}
.textInput
{
color:#cd8500;
fontFamily:"微软雅黑";
borderColor:#ff0000;
fontSize:20;
}
#t1
{
color:#00ff00;
fontFamily:"微软雅黑";
borderColor:#0000ff;
fontSize:20;
}
#t2
{
color:#0000ff;
fontFamily:"微软雅黑";
borderColor:#ff00ff;
fontSize:20;
}

复制代码 代码如下:

/* CSS file */
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
global
{
color:#191970;
fontFamily:"微软雅黑";
borderColor:#caff70;
fontSize:20;
borderWeight:3;
}
s|Panel
{
backgroundColor:"#E066FF";
}
s|TextInput
{
fontFamily:"微软雅黑";
borderColor:#ffff00;
fontSize:20;
}
.textInput
{
fontFamily:"微软雅黑";
borderColor:#ff0000;
fontSize:20;
}
#t1
{
color:"#00FFFF";
fontFamily:"微软雅黑";
borderColor:#0000ff;
fontSize:20;
}

复制代码 代码如下:

/* CSS file */
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
global
{
color:"#388E8E";
fontFamily:"微软雅黑";
borderColor:#caff70;
fontSize:20;
borderWeight:3;
}
s|Panel
{
backgroundColor:"#00B2EE";
}
s|TextInput
{
fontFamily:"微软雅黑";
borderColor:#ffff00;
fontSize:20;
}
.textInput
{
fontFamily:"微软雅黑";
borderColor:#ff0000;
fontSize:20;
}
#t1
{
color:"#6B8E23";
fontFamily:"微软雅黑";
borderColor:#0000ff;
fontSize:20;
}
您可能感兴趣的文章:
  • C# SkinEngine控件 给窗体添加皮肤的方法
  • JQuery UI皮肤定制
  • flex自定义按钮皮肤示例附图
  • flex中如何用图像给按钮做皮肤
  • ASP、PHP与javascript根据时段自动切换CSS皮肤的代码
  • flex中使用css样式修改TextArea滚动条的皮肤代码
  • jQuery切换网页皮肤并保存到Cookie示例代码
  • JQuery给网页更换皮肤的方法
  • python实现360皮肤按钮控件示例
  • js仿百度切换皮肤功能(html+css)

标签:吕梁 钦州 攀枝花 沧州 泰州 海西 佛山 仙桃

巨人网络通讯声明:本文标题《flex动态加载swf皮肤示例代码》,本文关键词  flex,动态,加载,swf,皮肤,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《flex动态加载swf皮肤示例代码》相关的同类信息!
  • 本页收集关于flex动态加载swf皮肤示例代码的相关信息资讯供网民参考!
  • 推荐文章