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
Ïà¹ØÎĵµ£º
±ÈÈçÎÒÒªÉèÖõ±Êó±êÒÆ¶¯µ½labelÉÏʱ£¬Êó±êÐÎ×´±ä³ÉÊÖÐÍ
¾ßÌå´úÂë
<mx:Label text="click me"
useHandCursor="true"
buttonMode="true"
mouseChildren="false"/>
Ö»ÒªÉèÖãº
use ......
flex builder ÉèÖ÷ÇϵͳĬÈÏ×ÖÌ壺
´æÔÚÎÊÌ⣺text²»ÄÜÉèÖÃbold£¬·ñÔò²»Æð×÷Óá£
·½·¨Ò»£º£¨css£©
<mx:Style>
@font-face
{
font-family: myFont;
& ......
Æäʵ¶ÔÓÚÕâ¸öÌâÄ¿ÊDz»Ç¡µ±µÄ£¬ÒòΪflexÖÐÊÇûÓÐÒ³ÃæÕâ¸ö¸ÅÄîµÄ£¬Ò³ÃæÔÚflexÀïÃæÆäʵ¾ÍÊÇÒ»¸ö¸öµÄCanvas£¬vbox£¬
hboxµÈµÈÖ®ÀàµÄ¶«Î÷£¬¿´µ½µÄ²»Í¬Ò³ÃæµÄÇл»£¬¾ÍÊÇÕâÐ©ÔªËØÒ»²ã²ãµÄ¶Ñ»ý£¬»òÕßÌæ»»£¬µ«ÊÇΪÁ˺ÃÀí½â£¬»¹ÊdzÆÖ®Îª
"Ò³ÃæÌø×ª"¡£ÆäʵÎÒÃÇ¿ÉÒԶԱȴ«Í³µÄC/S¿ª·¢Ä£Ê½£¬Ã»Ò³ÃæÌø×ª£¬Ö»Óд°ÌåºÍÔª¼þµÄÏÔʾºÍÒ ......
1:µ±ÓÃhttp://xxxxx/xxx.mxml?name=hermit·½Ê½·ÃÎÊ ¿ÉÒÔÓÃthis.parameters.nameÕâÖÖ·½Ê½ÔÚflexÀïÃæÈ¡url²ÎÊý
2:µ±ÓÃhttp://xxxxx/xxx.swf?name=hermit·½Ê½·ÃÎÊ ¿ÉÒÔÓÃthis.parameters.nameÕâÖÖ·½Ê½ÔÚflexÀïÃæÈ¡url²ÎÊý
3:µ±ÓÃhttp://xxxxx/xxx.html?name=hermit·½Ê½·ÃÎÊ ¿ÉÒÔÓÃthis.parameters.nameÕâÖÖ·½Ê½ÔÚflexÀïÃæÈ ......