We recently encountered a problem where bitmap images that we created dynamically were not being properly smoothed when rotated and scaled. We couldn’t see any obvious reason for it âÂ we were setting the container bitmap to smooth, tried every quality setting, but it still looked terrible.
The answer turned out to be super simple, if not immediately obvious. The Bitmap object in ActionScript 3 reverts its .smoothing property to false whenever you change it’s .bitmapData property. Because we were setting up our Bitmap objects in advance, then assigning BitmapData objects to them when they were created, it simply appeared as though smoothing just didn’t work in our project.
Here’s a quick code example:
var bmp:Bitmap = new Bitmap(null,true); trace(bmp.smoothing); // true bmp.bitmapData = bmpd; trace(bmp.smoothing); // false
And here’s what it looks like with smoothing on (top) versus off (bottom).
You can definitely see how our project wasn’t looking too good prior to fixing this issue.