动态换肤

 
  • <?xml version="1.0" encoding="utf-8"?>   
  • <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"    
  •      width="100" height="16" >   
  •     <mx:LinkButton width="16" height="16" color="#ff0000" icon="@Embed('assets/png/springbt.png')"  
  •          click="onChangeStyle(event)" x="0" id="spring" toolTip="春季主题"/>   
  •     <mx:LinkButton width="16" height="16" color="#ff0000" icon="@Embed('assets/png/summerbt.png')"  
  •          click="onChangeStyle(event)" x="17" id="summer" toolTip="夏季主题"/>   
  •     <mx:LinkButton width="16" height="16" color="#00ff00" icon="@Embed('assets/png/autumnbt.png')"  
  •          click="onChangeStyle(event)" x="34" id="autumn" toolTip="秋季主题"/>   
  •     <mx:LinkButton width="16" height="16" color="#ff0000" icon="@Embed('assets/png/winterbt.png')"  
  •          click="onChangeStyle(event)" x="51" id="winter" toolTip="冬季主题"/>   
  •     <mx:LinkButton width="16" height="16" color="#ff0000" icon="@Embed('assets/png/default.PNG')"  
  •          click="onChangeStyle(event)" x="68" id="defult" toolTip="默认主题"/>   
  •     <mx:Script>   
  •         <![CDATA[   
  •             import com.yyhy.webgis.model.ModelLocator;   
  •            
  •             private var __model:ModelLocator = ModelLocator.getInstance();   
  •                
  •             private function onChangeStyle(event:MouseEvent):void   
  •             {   
  •                 if(event.currentTarget == spring)   
  •                 {   
  •                     __model.selectskin = "Spring";   
  •                     StyleManager.loadStyleDeclarations("assets/skins/color/Spring.swf");   
  •                 }   
  •                 else if(event.currentTarget == summer)   
  •                 {   
  •                     __model.selectskin = "Summer";   
  •                     StyleManager.loadStyleDeclarations("assets/skins/color/summer.swf");   
  •                 }   
  •                 else if(event.currentTarget == autumn)   
  •                 {   
  •                     __model.selectskin = "Autumn";   
  •                     StyleManager.loadStyleDeclarations("assets/skins/color/autumn.swf");   
  •                 }                      
  •                 else if(event.currentTarget == winter)   
  •                 {   
  •                     __model.selectskin = "Winter";   
  •                     StyleManager.loadStyleDeclarations("assets/skins/color/winter.swf");   
  •                 }   
  •                 else if(event.currentTarget == defult)   
  •                 {   
  •                     __model.selectskin = "Start";   
  •                     StyleManager.loadStyleDeclarations("assets/skins/color/start.swf");   
  •                 }   
  •                 else   
  •                 {   
  •                     __model.selectskin = null;   
  •                     return;   
  •                 }   
  •             }              
  •         ]]>   
  •     </mx:Script>   
  • </mx:Canvas>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值