In the old days of Flash 7, anytime you scaled or rotated an image it was automatically smoothed. This was regardless of whether the image was embedded or loaded dynamically. Smoothing gives a nice sub-pixel, anti-aliased look to the resultant image. No smoothing gives a jaggedy, crappy-looking resultant image (see example below).
[kml_flashembed movie=”http://www.airtightinteractive.com/flash/smoothing/smoothing.swf” width=”400″ height=”560″ fversion=”9″/]
Now in Flash 9 when you dynamically load an image using the Loader class, smoothing is turned off by default. The recommended way to smooth the image is to copy the content of the loader into a Bitmap object and enable smoothing on it. The problem is that for images that are loaded cross-domain, we don’t have access to the BitmapData, so there is no way to smooth the image.
There are 2 work-arounds that unfortunately don’t work in many use cases:
- Use a server-side proxy. This is prohibitive for large scale apps in terms of bandwidth costs.
- Use crossdomain.xml files. Only works if you have access to the server where the image is coming from.
In my opinion, it should be possible to get smoothing on a cross-domain image. There’s 2 ways this could happen:
- Allow access to cross-domain BitmapData (although apparently this is not going to happen).
- Add a ‘smoothing’ property to the Loader class. Hopefully Adobe will consider this for a future rev of the player.
[UPDATE]
If you agree that Adobe should add a ‘smoothing’ property to the Loader class for Flash Player 10, please add a feature request here.


Latest Tweets