Hello every body, i trying this but nothing happen, even error: <?xml version="1.0" encoding="utf-8"?> <mx:Application creationComplete="initApp()" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.controls.Image; import flash.display.*; import mx.controls.Alert; import mx.containers.Canvas; public function initApp():void{ var bmd:BitmapData = Bitmap( this.imgBg.content ).bitmapData; var container:Canvas = new Canvas(); container.graphics.beginBitmapFill (bmd, null, true, false); container.graphics.drawRect (0, 0, 500, 500); addChild (container); } ]]> </mx:Script> <mx:Image id="imgBg" visible="false" source="../imagens/comum/bg.jpg" />
</mx:Application> --- In flexcoders@yahoogroups.com, "danielvlopes" <[EMAIL PROTECTED]> wrote: > > Hello, how can i do backgrounds with pattern in flex, exactly like we > can do in HTML when use background-image and small picture repeat in > entire website background? > > I try use background image but my picture be streched, and i try use > beginfillbitmap but din't work to. > > Anyone can help? Thanks. >