Thanks so much. It works fine now.
What I did now is that, on:
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
imageCompleteHandler);
}
private function imageCompleteHandler(event:Event):void
{
var loader:Loader = Loader(event.target.loader);
var myImage:Bitmap = Bitmap(loader.content);
myImage.width = 100;
myImage.height = 200;
addChild(myImage);
}
Regards
--- In [email protected], "marcel.panse" <[EMAIL PROTECTED]>
wrote:
>
> Just put the loader loaded data into a Image object and show the Image
> object in your canvas, set the height and with in your Image object to
> make it scale.
>
> If you really want to actual resize the bitmapdata you can do
> something like:
>
> public static function resizePhotoBitmapData(bitmapData:BitmapData,
> targetWidth:Number):BitmapData {
> //get the scale factors
> var scale:Number = targetWidth / bitmapData.width;
>
> //create the new bitmapdata with the new width/height
> var bmd:BitmapData = new BitmapData(bitmapData.width * scale,
> bitmapData.height * scale);
> var m:Matrix = new Matrix();
> m.scale(scale, scale); //create a scaling matrix
> bmd.draw(bitmapData, m, null, null, null, true); //and draw the new
> picture to the bitmapdata
>
> return bmd;
> }
>
>
> grtz,
> marcel panse
>
>
> --- In [email protected], "Joy" <joy9977@> wrote:
> >
> > Hi
> > I have a loader() object, which is loading "new URLRequest(
> > thumbSmall )" image. But I am not able to resize the width n height of
> > this. Please let me know how we can do it.
> > Thanks in advance.
> >
>