Use the mx:Image tag

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Wagner
Sent: Saturday, March 29, 2008 4:34 AM
To: [email protected]
Subject: [flexcoders] Image centering

 

Hello:

 

I am new with Flex.

 

I need to position an image ( can be a jpg, bmp, etc ) in a bitmaparea
bigger then the image size

I have tried codes like this but it is positioned in (0,0) 

 

How is the task accomplished ?

 

 

area:BitmapData = new BitmapData(200,200); 

var myBitmap:Bitmap = new Bitmap(bitmappicturefrom);

myBitmap.x = 100;

myBitmap.y = 100;

area.draw(myBitmap);

Thanks,

Michael.

 

Reply via email to