1

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!

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.