穿梭于丛林之间  
一个热爱设计的孩纸,有着程序猿的情节,干着穿山越岭工作。

以下以Group为例子讲述如何在Flex 4中填充背景颜色、图片: 

1、图片填充方式: 

1 <s:Group x="0" y="0" height="100%" width="100%"> 
2 <s:Rect x="0" y="0" height="100%" width="100%"> 
3 <s:fill> 
4 <s:BitmapFill source="@Embed('../imges/myBg.jpg')"/> 
5 </s:fill> 
6 </s:Rect> 
7 </s:Group>


2、渐变色填充方式: 

1 <s:Rect alpha="0.5" x="0" y="0" width="100%" height="100%"> 
2 <s:fill> 
3 <s:LinearGradient rotation="250"> 
4 <s:GradientEntry color="0x222222" ratio="0"/> 
5 <s:GradientEntry color="0xdddddd" ratio="1"/> 
6 </s:LinearGradient> 
7 </s:fill> 
8 </s:Rect>
posted on 2013-05-09 14:50  perrychum  阅读(186)  评论(0)    收藏  举报