AS3 Image Load Class 1.2

5-27-09 Update: Thanks to Winkyboy in the comments below, added smoothing to the resizing bitmaps.

Updates to my imageLoad class similar to the thumbnail class updates. Now it uses the UILoader component as well.  This makes the image scale to fit the image area defined in the default parameters, instead of using the exact dimensions. Also fixed the way the outline around the image works.

To instantiate in fla:


import com.marianomike.imageLoad;
var image1:imageLoad;
var image:String = "http://farm4.static.flickr.com/3181/3076099910_ac5b2b8a2f.jpg?v=0";//path to image
//imageLoad(img_image:String, img_width:uint, img_height:uint, bgColor:uint, outlineColor:uint, outlineSize:uint, txtColor:uint, showDrop:Boolean, scale:Boolean)
image1 = new imageLoad(image, 400, 266, 0x000000, 0x333333, 2, 0xFFFFFF, false, true);
addChild(image1);

Download Source

4 Comments »