| Bitmaps Smoothing |
| |
In order to allow external loaded bitmaps to have it smoothing turn on is by using the BitmapData Class.
In this example, i created a BitmapData instance and set the BitmapData smooth parameters to true to draw the external bitmap. This boolean will determines if a BitmapData object is smoothed when scale. The default value is false.

import flash.display.BitmapData;
import flash.geom.*;
var mc:MovieClip=createEmptyMovieClip("mc",getNextHighestDepth());
mc._x=190;
mc._y=10;
var mcl:MovieClipLoader=new MovieClipLoader();
mcl.addListener(this);
mcl.loadClip("http://www.thinklunatic.com/../images/caricature.jpg",mc);
function onLoadInit(mc:MovieClip){
var w:Number=mc._width;
var h:Number=mc._height;
var bd:BitmapData=new BitmapData(w,h,true,0x00000000);
var smc:MovieClip=createEmptyMovieClip("smc",getNextHighestDepth());
smc.attachBitmap(bd,2,"Always",true);
smc._x=190;
smc._y=10;
bd.draw(mc);
smc._xscale=80;
smc._yscale=80;
mc.removeMovieClip();
}

suggestion
|
| |
| |