I am trying to load a remote image into my AIR application, and I get the following error:
*** Security Sandbox Violation ***
SecurityDomain 'http://[------].com/app/widget/twitter.png' tried to access incompatible context 'app:/App.swf'
*domain name redacted
So it is basically saying that the remote image is trying to access the application? How do I add the remote domain as trusted?
I tried Security.allowDomain('www.[------].com')
and got the following error:
SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()
Do you have access to the remote domain to put a crossdomain.xml file on the root of the web-server?
If not, you can get around the sandboxing issues by loading the image as a byte array (See URLLoader) and then converting it into an image (See SWFLoader.loadBytes) in memory.