If you dynamically load images via actionscript and try to scale them, they become jagged. To fix this, you’ll have to set smoothing to true via code in AS3.
This example assumes you have an image named “photo.jpg” in the same directory as your flash file.
var imgLoader:Loader = new Loader(); imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete); imgLoader.load(new URLRequest("photo.jpg")); function loadProdComplete(e:Event):void { var bit:Bitmap = e.target.content; if(bit != null) bit.smoothing = true; thumb_mc.addChild(e.target.content); }
Also note if you images are not dynamically loaded, and are stored in the library, you can simply check the box to ‘Allow smoothing’ via the bitmap properties panel.



Pingback: as3 smoothing loaded image « MisterSaisho.com