1 Reply Latest reply on Mar 24, 2008 3:23 PM by josh_on

    BitmapData.draw and allowDomain

    josh_on Level 1
      This post in the Adobe documentation for BitmapData.draw sums up my situation:

      quote:

      "If you control both domains in a cross-domain situation, you can use System.security.allowDomain to permit BitmapData.draw to work across domains. Say that domain A is the one calling BitmapData.draw, and domain B is the one from which the media was loaded. If the media from domain B is a SWF, it can call System.security.allowDomain("domainA.com"), and then the SWF from domain A can call BitmapData.draw."


      However, using any of the Flashplayer nine players I can not reproduce this successfully. I have tried adding a request for crossdomain.xml on domain B by domain A, and have used System.security.allowDomain("*") in both movies for good measure. If I use the same movies on the same server the function performs.

      Is it possible to draw the content of a swf from domain B loaded into a movie from domain A if you control both domains and both movies? Does anyone know of a working example of this? Is the quote from above valid? Are there some exceptions that I should know about?

      Thanks for your time.