I am trying to enable communication between Javascript and Flash via ExternalInterface across domains. The Javascript works great when it is located on the same domain as the SWF. But in one case, the HTML resides on domain A, the javascript and the flash both reside on domain B. I have done all of the following:
- The embed tag has
allowScriptAccess="always"
(and the object has that as a param) - My SWF file's actionscipt has
Security.allowDomain("*")
- My SWF also calls
Security.allowInsecureDomain("*")
- Both domain A and domain B have a
/crossdomain.xml
file which hasallow-access-from domain="*"
The SWF is able to call javascript on the page, but when I use Javascript to call functions exposed by ExternalInterface, I get
Error calling method on NPObject! [plugin exception: Error in Actionscript. Use a try/catch block to find error.]
This is ActionScript 2 so ExternalInterface.marshallExceptions
is not available.