Post edited 11:04 pm – November 14, 2009 by bailiwick
Post edited 11:06 pm – November 14, 2009 by bailiwick
Your site is fabulous and inspiring!
Thank you for your effort.
While studying tutorial “Mouse Over Image Animation” you want us to set stage size according to an image to be loaded.
That's fine, but what if I want to resize downloaded image so that it fits on the stage instead.
I did following:
imageLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);
function completeHandler (event:Event):void
{
var Img:Bitmap = event.target.content;
Img.width = 300; //or stage.stageWidth;
Img.height = 200;//or stage.stageHeight;
//Get the bitmap data of the loaded image
var imageTextureMap:BitmapData = Img.bitmapData;
}
The whole script works, including the whole effect, but image doesnt get resized at all.
Even if I try resize “imageLoader” nothing changes.
Any suggestion?
Thanks for your help!