易截截图软件、单文件、免安装、纯绿色、仅160KB

FLEX实践—动态切换应用皮肤

     在同一个Application中动态切换主题,这里采用的是动态引用不同的CSS文件。
      具体步骤如下:
     1)创建CSS文件
      skyTheme.css
      /* CSS file */
.backgroudSkin
{
   backgroundColor: #89caec;
   fontWeight:bold;
 fontSize:12;
}
.applicationBar
{
    cornerRadius:20; 
    stype:solid;
    fillAlphas:0.42, 0.42;
}
     treeTheme.css
/* CSS file */
.backgroudSkin
{
   backgroundColor: #bee38a;
   fontWeight:bold;
 fontSize:12;
}
.applicationBar
{
    cornerRadius:5; 
    fillAlphas:0, 0;
}
   2)将每一个CSS文件右键选择"Compile CSS to SWF"
   3)创建ThemeTest.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" styleName="backgroudSkin">
 <mx:Script>
   <![CDATA[
     import mx.styles.StyleManager;
     private var style:String;
    
     private function changeTheme(theme:String):void{
      //切换CSS文件
      StyleManager.loadStyleDeclarations(theme, true);
      
     }
   ]]>
 </mx:Script>
 <mx:ArrayCollection id="skinCollection">
      <mx:Object label="SkyTheme" data="theme/skyTheme.swf"/>
      <mx:Object label="TreeTheme" data="theme/treeTheme.swf"/>
    </mx:ArrayCollection>
 <mx:ApplicationControlBar x="10" y="10" width="100%" height="50" styleName="applicationBar">
  <mx:ComboBox id="skinSelect


相关文档:

flex progressBar mode

      mode有三种模式:ProgressBarMode.EVENT,ProgressBarMode.POLLED ,ProgressBarMode.MANUAL ,事件模式和轮询模式是最常用的模式。 在事件模式下,source 属性指定生成 progress 和 complete 事件的加载内容;在此模式下,应使用 UILoader 对象。 在轮询模式下,source 属性指定公开 bytes ......

flex builder载入字体

 flex builder 设置非系统默认字体:
存在问题:text不能设置bold,否则不起作用。
方法一:(css)
<mx:Style>
        @font-face
        {
            font-family: myFont;
   & ......

个人总结flex应用 II【经典】

Mxml组件的打开和关闭特效
openDuration="1000" openEasingFunction="Bounce.easeOut"
closeDuration="1000" closeEasingFunction="Bounce.easeIn"
//菜单透明效果
background-color:#000000;
background-alpha:0.1;
border-style:solid;
drop-shadow-color:#000000;
drop-shadow-enabled:yes;
//展开所 ......

flex 笔记(更新中。。。。)

1、如果要设置Validator验证组件里面提示字的大小,可以在mxml中加入
    <mx:Style>
<!--[CDATA[
.errorTip
{
fontSize: 12;
}
]]-->
</mx:Style>
2、设置tooltip中的样式(如字体大小,颜色)可在mxml中的creationComplete的initApp()加入
    ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号