Hello, I am using preview resources directly from various marketplaces and having security sandbox problems. I was hoping they wouldn’t occur when my preview is hosted on ActiveDen servers but it sometimes works, most of the time not.
I wanted to ask how do we solve this issue so I won’t waste time uploading various previews till it gets solved.
Do you mean you’re loading things in from other sites and you’re encountering a sandbox problem? If so, this might help:
import flash.system.Security; Security.allowDomain("*");
The star is a wildcard that means all will be allowed. But sometimes you have to take it a step further and load in the external site’s cross-domain policy like this:
var loader:Loader = new Loader(); loader.load(new URLRequest("asset.jpg"), new LoaderContext(true));
The second param with “true” passed into stands for “checkPolicyFile”.
Or you could preload the cross domain policy file like this:
Thanks. Security.allowDomain(”*”); was present somewhere and the reason it sometimes works and sometimes not confused me. I will try your codes now. My first time loading other’s previews into my files
Hmm, I am checking some crossdomain files and there seems to be no permission for activeden. Old flashden permissions remain instead.
Thanks, it seems solved now. And also, I sent in a ticket regarding crossdomain activeden permissions, it should be updated soon.