1 Reply Latest reply on Apr 5, 2007 6:03 AM by MotionMaker

    BitmapData, MovieClip.attachBitmap(), and smoothing across domains


      Is it possible that "smoothing" is one of the things you can't do to BitmapData when the source image is loaded from a remote domain? That's been our experience. We are trying to prove to management that Flash is a viable tool for smooth pan and zoom. Using BitmapData.draw() with smoothing set to "true" and MovieClip.attachBitmap() with smoothing set to "true" you can achieve nice results doing a slow smooth pan and zoom (think "Vista slideshow"). Running a stand alone Flash player (Ctrl+Enter from Flash 8) you can do this equally well with images loaded from the local machine or URLs from a remote server on another domain across the internet. The problem comes when you deploy to a web page on a local server. All of a sudden, only the local images smooth nicely. All the remote images pulled from another domain loose their nice smoothing.

      I'm taking this to mean that smoothing is one of the things that has been turned off due to some security policy. The question is why is that? That means I can't create a single slideshow that points to images from various sites like Flickr and Spaces without first copying all the images to my local server and displaying them from there. Seems like a strange decision.

        • 1. Re: BitmapData, MovieClip.attachBitmap(), and smoothing across domains
          MotionMaker Level 1
          I am not completely sure but there may be a known bug in Flash player 8 with security and externally loaded images across domains. And also I believe it is fixed for Flash player 9.

          If there is and you or anyone finds some sources on it, I also would appreciate your post.

          In the meantime here is our experience with this on a project.

          In one testing scenario we load the shell movie in the Flash IDE to get a pre-staging test and there the live data is coming from the http content server but the shell movie is local. Thus the Bitmap reflection transforms we are doing fail when tested locally.

          As a fix to facilitate the local testing I add this line

          System.security.allowDomain(" http://theDomainorIP");

          Maybe it might help in your case.