`

flex动态切换皮肤

阅读更多

http://fykyx521.iteye.com/blog/523826

 

http://www.cnblogs.com/mobile/archive/2007/02/02/638038.html

不知道有没有人想我一样,刚开始的是怎么都不成功,原来是css文件要编译成swf文件 :(惭愧啊。

右键选择css文件,编译为swf;或者使用mxmlc aaa.css 就可以了,

下面的就是用StyleManager.loadStyleDeclarations('aqua.swf',true)来切换你的css了。

flex 皮肤

http://scalenine.com/blog/2007/01/25/try-themes-with-ease/

http://blog.163.com/to_yht/blog/static/1227257742009741359326/

http://fleksray.org/Flex_skin.html

 

Obsidian Theme: http://try.scalenine.com/obsidian/obsidian.css

iTunes 7 Theme: http://try.scalenine.com/itunes7/jukebox.css

WMP 11 Theme: http://try.scalenine.com/wmp11/wmp11.css

Moxy CSS Theme: http://try.scalenine.com/moxy/moxy.css

Minty CSS Theme: http://try.scalenine.com/minty/minty.css

Shadow CSS Theme: http://try.scalenine.com/shadow/shadow.css

Darkroom Theme: http://try.scalenine.com/darkroom/darkroom.css

Vista Blue Theme: http://try.scalenine.com/vistaBlue/vistaBlue.css

Java代码 复制代码
  1. <?xml version="1.0" encoding="utf-8"?>   
  2. <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">   
  3.     <mx:Panel x="146" y="35" width="346" height="223" layout="absolute">   
  4.         <mx:Button x="43" y="125" label="Button"/>   
  5.         <mx:Button x="130" y="125" label="Button"/>   
  6.         <mx:CheckBox x="212" y="125" label="Checkbox"/>   
  7.         <mx:LinkButton x="122" y="71" label="LinkButton"/>   
  8.     </mx:Panel>   
  9.        
  10.        
  11.     <mx:Script>   
  12.         <![CDATA[   
  13.             private function changeStyle():void{   
  14.                 var s:String=test.selectedItem.source;   
  15.                 StyleManager.loadStyleDeclarations(s,true);   
  16.             }   
  17.         ]]>   
  18.     </mx:Script>   
  19.     <mx:Style source="http://try.scalenine.com/obsidian/obsidian.css"/> 这样的话服务器需要安全策略文件crossdomain.xml   
  20.     <mx:HBox>   
  21.         <mx:ComboBox id="test">   
  22.         <mx:dataProvider>   
  23.             <mx:Object source="style/yflexskin.swf">   
  24.                    
  25.             </mx:Object>   
  26.             <mx:Object source="assets/skins/flex_skins.swf">   
  27.                    
  28.             </mx:Object>   
  29.         </mx:dataProvider>   
  30.     </mx:ComboBox>   
  31.     <mx:Button label="changeStyle()" click="changeStyle();"/>   
  32.     </mx:HBox>   
  33.        
  34. </mx:WindowedApplication>  

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics