SOLUTION SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller + CDN + AMAZAON S3 + SWFObject

by troy on January 22, 2010

If you have your assets on Amazon S3 and are using SWFObject you might run into SecurityError: Error #2060:

This is two parts, one you need to get your
allowscriptaccess = "always" since if your serving the html from http://www.yoursite.com and the assets are coming from a different domain e.g. http://yourcdn.amazons3.com you need to allow them to talk to each other.

and if you are using SWFObject with dynamic publishing make sure that flash actually gets that! as it has to go through the magic and mystery of javascript.

So here's the solution, this one baffles me but whatever.

GOOD VERBOSE:
var params = {};
params.allowscriptaccess = "always";
params.menu = false;

BAD INLINE
var params = {allowscriptaccess = "always", menu="false"};

I found this out by using the awesome SWFObject Generator application, then contrasting to what we had coded.