Skip to main content
Inspiring
March 24, 2008
Answered

BitmapData.draw and allowDomain

  • March 24, 2008
  • 1 reply
  • 306 views
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.
This topic has been closed for replies.
Correct answer josh_on
It seems that the functions that were failing were getBounds() and accessing the transform.concatenatedMatrix in the loaded swf in the process of preparing to draw the bitmap.

1 reply

josh_onAuthorCorrect answer
Inspiring
March 24, 2008
It seems that the functions that were failing were getBounds() and accessing the transform.concatenatedMatrix in the loaded swf in the process of preparing to draw the bitmap.