BoderContainer用法——backgroundFill

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate Spark BorderContainer component -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
			   xmlns:s="library://ns.adobe.com/flex/spark">
	<s:Panel title="BorderContainer Component Example"
			 width="75%" height="75%" 
			 horizontalCenter="0" verticalCenter="0"> 
		
		<s:BorderContainer 
			cornerRadius="10"
			borderAlpha="0.8"
			left="10" right="10" top="10" bottom="10">
			<s:backgroundFill> 
			<s:SolidColor 
				color="#FF0000" 
				alpha="0.8"/> 
			</s:backgroundFill> 
			<!--设置边框笔触的属性,Color、weight-->
			<s:borderStroke> 
			<s:SolidColorStroke 
				color="blue" 
				weight="4"/> 
			</s:borderStroke> 
		</s:BorderContainer> 
	</s:Panel>
</s:Application>

 

 

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
			   xmlns:s="library://ns.adobe.com/flex/spark">
	<s:VGroup gap="40" top="20" horizontalCenter="0">
		<!--一般颜色填充-->
		<s:BorderContainer
			horizontalCenter="-1" top="0"
			backgroundColor="#CCCCCC"
			borderColor="#000000" borderWeight="3" width="447">
			<s:Label text="A BorderContainer with styles"
					 fontSize="14" fontWeight="bold"
					 horizontalCenter="0" verticalCenter="0"/>
		</s:BorderContainer>
		<s:BorderContainer width="449" 
						   borderColor="#000000" 
						   borderWeight="4">
			<!--填充发散的夜色-->
			<s:backgroundFill>
				<s:RadialGradient>
					<s:entries>
						<s:GradientEntry color="#FFFFFF"/>
						<s:GradientEntry color="#999999"/>
					</s:entries>
				</s:RadialGradient>
			</s:backgroundFill>
			<s:Label text="A BorderContainer with a RadialGradient backgroundFill object"
					 fontSize="14" fontWeight="bold"
					 horizontalCenter="0"
					 verticalCenter="0"/>
		</s:BorderContainer>
		
		<s:BorderContainer width="447" 
						   borderColor="#000000" 
						   borderWeight="4">
			<s:backgroundFill>
				<!--填充线性颜色-->
				<s:LinearGradient>
					<s:entries>
						<s:GradientEntry color="#FFFFFF"/>
						<s:GradientEntry color="#999999"/>
					</s:entries>
				</s:LinearGradient>
			</s:backgroundFill>
			<s:Label text="A BorderContainer with a LinearGradient backgroundFill object"
					 fontSize="14" fontWeight="bold"
					 horizontalCenter="0"
					 verticalCenter="0"/>
		</s:BorderContainer>
	</s:VGroup>
</s:Application>

 

关于GradientEntry:

官方API:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/graphics/GradientEntry.html

 

 

其他属性用法点击这里:

 

http://zhuobinzhou.iteye.com/blog/839691

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值