tags:

views:

539

answers:

1

I have use the following AS2 code

frontLoader = new ImageLoader(object1,"fit",iWidth,iHeight);
frontLoader.loadImage(src.Url);   

frontLoader = new ImageLoader(object1,"fit",iWidth2,iHeight2);
frontLoader.loadImage(src.Url);

which generate 2 external calls to server, how I can load image once and use it several times in different dimensions

+1  A: 

Use Bitmap and BitmapData classes to scale your image. Load it at maximum possible resolution and then apply a suitable transform.

Here's the AS3 documentation on how to use these classes. It should give you a fair idea of what you can do with AS2.

dirkgently