<?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>
你先產生陰影就往這裡看看
最新推荐文章于 2022-02-28 11:02:32 发布