When you load an image into a MovieClip then use that as the data source to draw() into a BitmapData object, the [URL=“http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001950.html”]documentation says “Optionally, you can specify whether the bitmap should be smoothed when scaled. This works only if the source object is a BitmapData object.” To me that implies that a second BitmapData object is needed in order for the optional [smooth:Boolean] parameter to work when set to true.
We found we didn’t need to “double buffer” in this way when using MovieClip.attachBitmap() with the [smoothing:Boolean] parameter set to true. We did run into another problem though. This problem only manifests itself when you run the SWF as part of an HTML file running from a local web server like http://127.0.0.1. Here’s the problem: images are loaded dynamically (URL’s pulled from assets.xml) and the ones that are loaded locally from a directory on the same machine load and are smooth and distortion free. Other URL’s point to a remote host. The images loaded via a remote source ([URL=“http://byfiles.storage.msn.com/x1pTep_x_MO7tANO5BuN0ePsX0JKUBVhxeGyVrngGHOHCCM1hT_KX7hNA_Cee1TEqVpNq6IGWtDVeipTM1A0Gf4Epr-QnFX0LE1pS3NuuWZhCZx9AsNR6AJbQ”]example) do not “smooth nicely” running the exact same code as the local images. The remote images are shimmery and exhibit update artifacts. If you run the exact same page not via an http:// web sever i.e. - just loading the html page into the IE, then the remote images do get nice smoothing when animated.
Is there some magic to get BitmapData loaded from a remote source to smooth correctly when run from a local web sever? For our internal demo we removed any remote URLs so we could demonstrate that Flash does provide the ability for nice smooth animations but it would be a good problem to solve.
I’m thinking this is some type of security sandboxing Flash Player control feature.
Mark