I ran into this same issue recently. When you load the image, you just need to 
specify a LoaderContext with checkPolicyFile set to true. 

Here's a link to a blog post that explains it pretty well: 
http://www.toybot.nl/blog/2008/03/19/bitmapdatadraw-and-checkpolicyfile/


--- In [email protected], "s_hernandez01" <s_hernande...@...> wrote:
>
> Hey does anyone know why I get this error:
> 
> SecurityError: Error #2122: Security sandbox violation: BitmapData.draw: 
> http://localhost/beta/Test-debug/Test.swf cannot access 
> http://MyDomainName.com/beta/images-standard/backgrounds/paper.png. A policy 
> file is required, but the checkPolicyFile flag was not set when this media 
> was loaded.
> at flash.display::BitmapData/draw()
> 
> I have the xml file "crossdomain.xml" on the root of my webserver:
> 
> <?xml version="1.0"?>
> <cross-domain-policy>
>     <allow-access-from domain="www.MyDomainName.com"/>
> </cross-domain-policy>
> 
> but when I run the app locally I always get this error.  All I'm doing is 
> trying to retreive images from my database.  What more do I need to do?
> 
> 
> Thanks
> 
> Sal
>


Reply via email to