button_overskin.mxml

来自「flex书效果代码」· MXML 代码 · 共 48 行

MXML
48
字号
<?xml version="1.0" encoding="utf-8"?>
<degrafa:GraphicBorderSkin 
	xmlns:mx="http://www.adobe.com/2006/mxml" 
	xmlns:degrafa="http://www.degrafa.com/2007">
	
	<mx:Script>
		<![CDATA[
			[Bindable]
			private var awidth:Number=0;

            [Bindable]
			private var aheight:Number=0;
			
			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
			{
				super.updateDisplayList(unscaledWidth, unscaledHeight);
				awidth = unscaledWidth;
				aheight = unscaledHeight;
			}
		]]>
	</mx:Script>
	
	<degrafa:GradientFill id="MainFill" angle="90" >
		<degrafa:GradientStop  alpha="1" color="#E5E5E5"/>
		<degrafa:GradientStop  alpha="1" color="#D0D0D0"/>
	</degrafa:GradientFill>

 	<degrafa:GradientFill id="WashFill" angle="90" >
		<degrafa:GradientStop  alpha=".75" color="#FFFFFF"/>
		<degrafa:GradientStop  alpha="0" color="#FFFFFF"/>
	</degrafa:GradientFill>
		
	<degrafa:SolidStroke id="theStroke" color="#2B6BCE" />
	
	<degrafa:geometry>
		
		<degrafa:RoundedRectangleComplex width="{awidth}" height="{aheight}" 
			topLeftRadius="6" topRightRadius="6" bottomLeftRadius="6" bottomRightRadius="0"
			fill="{MainFill}" stroke="{theStroke}" />
			
		<degrafa:RoundedRectangleComplex x="1" y="2" width="{awidth-2}" height="{aheight/3}" 
			topLeftRadius="4" topRightRadius="4" bottomLeftRadius="4" bottomRightRadius="0"
			fill="{WashFill}" />
		
	</degrafa:geometry>
	
</degrafa:GraphicBorderSkin>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?