简体   繁体   English

ExternalInterface的。 addcallback在本地工作,但不在服务器上?

[英]ExternalInterface. addcallback works locally, but not on server?

Confused by a problem with ExternalInterface.addcallback. 对ExternalInterface.addcallback的问题感到困惑。

Mainly because I have it ALWAYS working locally, when I test in a browser, but the moment I deploy to a server it stops working. 主要是因为我总是在本地工作,当我在浏览器中测试时,但是当我部署到服务器时它停止工作。

I've added trace commands and confirmed that ExternalInterface is in fact available before adding the callback, and an alert command in the javascript method correctly identifies the flash object. 我添加了跟踪命令并确认在添加回调之前ExternalInterface实际上是可用的,并且javascript方法中的alert命令正确识别了flash对象。 I also checked and allowscriptaccess is set to 'always'. 我还检查并将allowscriptaccess设置为'always'。

Could it have something to do with the flash being served on a remote server? 它可能与远程服务器上提供的闪存有关吗?

really stumped 真的很难过

Try adding System.security.allowDomain("*"); 尝试添加System.security.allowDomain(“*”); (or actually filling out the correct domain instead of *). (或实际填写正确的域而不是*)。 To your AS. 给你的AS。

You already have allowscriptaccess. 你已经有了allowscriptaccess了。 Also make sure the swf and the html/js are coming from the same host.... not www.foobar.com and foobar.com for the other, sometimes that will getcha. 还要确保swf和html / js来自同一个主机....不是www.foobar.com和foobar.com的另一个,有时候会得到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM