你先產生陰影就往這裡看看

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#ffffff" creationComplete="init();" layout="absolute" themeColor="#FFFFFF" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]" width="683" height="250" borderStyle="none">
<mx:Style>
 .button{
   fillColors:#ADC6C3,#ADC6C3,#ADC6C3,#ADC6C3;
   highlight-alphas:1.0,1.0,1.0,1.0;
   border-thickness:0;
 }
 .buttonBackgroup{
   fillColors:#00639A,#00639A,#00639A,#00639A;
   border-style:outset;
   highlight-alphas:1.0,1.0,1.0,1.0;
 }
</mx:Style>
<mx:Script>
 <![CDATA[
  import mx.controls.Button;
  import mx.styles.StyleManager;
  import mx.controls.Alert;
  import mx.events.ColorPickerEvent;
  internal  function init():void
  {
   ExternalInterface.addCallback("setColor",setCurrentColor);//注册外界调用
   ExternalInterface.addCallback("setBackColor",setBackgroupColor);//注册外界调用
   var colorCurrentVal:String = Application.application.parameters.CurrentColor;
   var colorBackVal:String = Application.application.parameters.BackColor;
   if(colorCurrentVal!=null)
   {
      setCurrentColor(colorCurrentVal);
   }
   if(colorBackVal!=null)
   {
      setBackgroupColor(colorBackVal);
   }
  }
  //設置當前顏色
  public function setCurrentColor(col:String):void
  {
   if(col!=null)
     {
   var ArryColor:Array = new Array();
   ArryColor.push(col,col,col,col);
   StyleManager.getStyleDeclaration(".button").setStyle("fillColors",ArryColor);
   StyleManager.getStyleDeclaration(".button").setStyle("borderColor",col); 
     }
  }
  //設置背景顏色
  public function setBackgroupColor(col:String):void{
     if(col!=null)
     {
    var ArryBackColor:Array = new Array();
    ArryBackColor.push(col,col,col,col);
             StyleManager.getStyleDeclaration(".buttonBackgroup").setStyle("fillColors",ArryBackColor);
     }
  }
 ]]>
</mx:Script>
 <mx:Button x="23" y="20"  height="185" width="90" cornerRadius="10" styleName="buttonBackgroup" enabled="true" themeColor="#FFFFFF" fillAlphas="[1.0, 1.0, 1.0, 1.0]">
 <mx:filters>
 <mx:DropShadowFilter /></mx:filters>
 </mx:Button>
 <mx:Button x="24" y="110" height="7" width="89" styleName="button" enabled="true" themeColor="#FFFFFF" fillAlphas="[1.0, 1.0, 1.0, 1.0]" cornerRadius="0"/>
 <mx:Button width="45" height="45" cornerRadius="40" x="44" y="41" styleName="button" themeColor="#FFFFFF" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]" />
 <mx:Button x="133" y="20" height="185" width="90" cornerRadius="10" styleName="buttonBackgroup" enabled="true" themeColor="#FFFFFF" fillAlphas="[1.0, 1.0, 1.0, 1.0]">
 <mx:filters>
 <mx:DropShadowFilter /></mx:filters>
 </mx:Button>
 <mx:Button x="243" y="20"  height="185" width="90" cornerRadius="10" styleName="buttonBackgroup" enabled="true" themeColor="#FFFFFF" fillAlphas="[1.0, 1.0, 1.0, 1.0]">
 <mx:filters>
 <mx:DropShadowFilter/></mx:filters>
 </mx:Button>
 <mx:Button x="353" y="20" height="185" width="90" cornerRadius="10" styleName="buttonBackgroup" enabled="true" themeColor="#FFFFFF" fillAlphas="[1.0, 1.0, 1.0, 1.0]">
 <mx:filters>
 <mx:DropShadowFilter /></mx:filters>
 </mx:Button>
 <mx:Button x="463" y="20" height="185" width="90" cornerRadius="10" styleName="buttonBackgroup" enabled="true" themeColor="#FFFFFF" fillAlphas="[1.0, 1.0, 1.0, 1.0]">
 <mx:filters>
 <mx:DropShadowFilter /></mx:filters>
 </mx:Button>
 <mx:Button x="573" y="20" height="185" width="90" cornerRadius="10" styleName="buttonBackgroup" enabled="true" themeColor="#FFFFFF" fillAlphas="[1.0, 1.0, 1.0, 1.0]">
 <mx:filters>
 <mx:DropShadowFilter /></mx:filters>
 </mx:Button>
 <mx:Button width="30" height="30" cornerRadius="25" x="144" y="46" styleName="button" themeColor="#FFFFFF" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="30" height="30" cornerRadius="25" x="180" y="58" styleName="button" themeColor="#FFFFFF" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="45" height="45" cornerRadius="40" x="156" y="141" styleName="button" themeColor="#FFFFFF" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="254" y="66" styleName="button" themeColor="#FFFFFF" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="298" y="33" styleName="button" themeColor="#FFFFFF" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="254" y="164" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="297" y="132" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="363" y="166" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="406" y="134" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="369" y="65" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="402" y="65" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="478" y="166" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="514" y="134" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="478" y="134" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="514" y="166" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="475" y="69" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="497" y="53" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="518" y="35" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="475" y="35" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="518" y="69" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="20" x="585" y="169" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="606" y="152" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="627" y="134" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="585" y="134" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="628" y="169" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="582" y="67" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="607" y="67" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="630" y="37" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="606" y="37" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="582" y="37" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="23" height="23" cornerRadius="23" x="631" y="67" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="402" y="35" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="369" y="35" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="385" y="151" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="276" y="149" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button width="25" height="25" cornerRadius="25" x="277" y="51" styleName="button" themeColor="#FFFFFF" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"/>
 <mx:Button x="134" y="110" height="7" width="89" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"  cornerRadius="0"/>
 <mx:Button x="244" y="110" height="7" width="89" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"  cornerRadius="0"/>
 <mx:Button x="353" y="110" height="7" width="89" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"  cornerRadius="0"/>
 <mx:Button x="463" y="110" height="7" width="89" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"  cornerRadius="0"/>
 <mx:Button x="573" y="110" height="7" width="89" styleName="button" enabled="true" fillAlphas="[1.0, 1.0, 1.0, 1.0]"  cornerRadius="0"/>
 <mx:Label x="10" y="10" width="663" height="207"/>
</mx:Application>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值