flash – calling externalinterface.call from embedded swf from another server is not working in Firefox – Education Career Blog

I have an index.html on server A.

In index.html I embed a swf from server B.

The swf contains a init with
flash.external.ExternalInterface.call(“alert”, “externalalert”);

When I run the swf on server B it works, when I run the swf through the index.html on server A I get an : Security sandbox violation: ExternalInterface caller…

It does work in IE.

Does anybody know what I’m doing wrong.

Thanks!

,

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.

Note that you will also need to set allowScriptAccess="always" in the swf embed tags to allow cross-scripting.

,

You are doing nothing wrong. This is a restriction of the Flash player. Interacting between different domains is not allowed. You could try to use a crossdomain.xml. (But I do not know if this works you ExternalInterfaces).
More Information can be found here:

Leave a Comment