Flex 4中組件背景設置(填充方式)group爲例子

以下以Group爲例子講述如何在Flex 4中填充背景顏色、圖片: 

1、圖片填充方式: 
<s:Group x="0" y="0" height="100%" width="100%"> 
<s:Rect x="0" y="0" height="100%" width="100%"> 
<s:fill> 
<s:BitmapFill source="@Embed('../imges/myBg.jpg')"/> 
</s:fill> 
</s:Rect> 
</s:Group> 

2、漸變色填充方式: 

<s:Rect alpha="0.5" x="0" y="0" width="100%" height="100%"> 
<s:fill> 
<s:LinearGradient rotation="250"> 
<s:GradientEntry color="0x222222" ratio="0"/> 
<s:GradientEntry color="0xdddddd" ratio="1"/> 
</s:LinearGradient> 
</s:fill> 

</s:Rect>


From:

http://blog.csdn.net/sws9999/article/details/6262954

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章