上文我们已经完成一个仪表盘的fxg,然后把我们的fxg转化成skin,我新建一个flex 外观 skin源代码: <?xml version="1.0" encoding="utf-8"?> <!-- ADOBE SYSTEMS INCORPORATED Copyright 2008 Adobe Systems Incorporated All Rights Reserved. NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the license agreement accompanying it. --> <!--- The default skin class for a Spark SkinnableContainer container. @see spark.components.SkinnableContainer @langversion 3.0 @playerversion Flash 10 @playerversion AIR 1.5 @productversion Flex 4 --> <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled="0.5" height.normal="228"> <fx:Metadata>[HostComponent("com.shine.framework.core.view.BaseSimpleContainer")]</fx:Metadata> <fx:Script> <!--[CDATA[ private function complete():void{ } public function setValue(value:int):void{ if(value>0&&value<101){ valueLabel.text=String(value); if(value==100){ for(var j:int=1;j<11;j++){ SolidColor(this["pathColor"+String(j)]).color=0x122e29; } return; } for(var j:int=1;j<11;j++){ SolidColor(this["pathColor"+String(j)]).color=0x67bd45; } if(value>10&&value<100){ for(var i:int=1;i<=value/10;i++){ SolidColor(this["pathColor"