[code xml] <![CDATA[ import mx.core.BitmapAsset; [Embed(source="background.gif")] [Bindable] public var imgCls:Class; public var varOne:String = ""; private function modImage():void { // 내장 클래스로 부터 개체를 생성합니다. // 이미지 파일을 Embed 합니다. // 데이터 형식은 BitmapAsset var imgObj:BitmapAsset = new imgCls() as BitmapAsset; // 개체 수정 imgObj.bitmapData.noise(4); } ]]> </mx:Script> <mx:VBox width="100%" height="100%" backgroundImage="{imgCls}" /> //는 ]]> 아래에 출력[/code]Flex에서 간단하게 배경이미지를 사용할 수 있는 예제입니다.
background.gif(예시) 이미지는 해당 폴더 안에 포함되어있으면 됩니다.
이미지는 작은 용량의 이미지와 해당 크기에 맞추는 걸 권장해드립니다. (이미지로 인해 용량증가가 거대하게 나타날 수 있습니다.)

Posted by Yaluka

2009/10/22 17:13 2009/10/22 17:13
, , , , ,
Response
2 Trackbacks , 3 Comments
RSS :
http://blog.yaluka.com/rss/response/98


블로그 이미지

- Yaluka

Notices

Archives

Authors

  1. Yaluka

Calendar

«   2012/02   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Site Stats

Total hits:
165134
Today:
35
Yesterday:
45