Making a note of this here because I don’t see it in any of the docs.
When using ExternalInterface cross-domain (i.e. the swf and JS are on different domains) you may get an ‘Unspecified error’ message in IE. Debugging in Visual Studio gives an ‘unknown exception’ in the return statement of this function:
function __flash__addCallback(instance, name) {
instance[name] = function () {
return eval(instance.CallFunction("
}
}
The fix is to add
System.security.allowDomain("*");
in your AS code. ExternalInterface requires the allowDomain to be set when HTML-SWF cross-scripting is performed even though it’s local to your browser. Thanks to my co-worker Sean Neville for this information.
(Note that you will also need to set allowScriptAccess="always"
in the swf embed tags to allow cross-scripting)