How to make the thumbnail a size of 84×84 pixel?
function createThumbs()
{
_myThumbData = new BitmapData(photodefault.width,photodefault.height,false,0xffffff);
photothumbs.t1.addChild(createBitmap(_myThumbData));
}
function createBitmap(bmd:BitmapData):Bitmap
{
var bitmap:Bitmap = new Bitmap(bmd);
bitmap.smoothing = true;
bitmap.scaleX = bitmap.scaleY = 0.2;
return bitmap;
}
Thanks.
Uli
Based on your comment, you need to resize and maintain the aspect ratio.
You need to compute the aspect ratio for the original image and the container, then resize the container based on the larger ratio. here’s what I mean: