skinClass的使用方法:
【1.属性引用】
<s:Application name="Spark_Application_skinClass_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" skinClass="skins.CustomApplicationSkin"> </s:Application>
【2.css引入】
<fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; s|Application { skinClass: ClassReference("skins.CustomApplicationSkin"); } </fx:Style>
【3.as代码指定,这个更适合动态皮肤】
<fx:Script> <![CDATA[ import skins.CustomApplicationSkin; protected function btn_click(evt:MouseEvent):void { setStyle("skinClass", CustomApplicationSkin); } ]]> </fx:Script>