外部接口。 addcallback 在本地工作,但在服务器上不起作用?

发布于 2024-10-01 13:13:56 字数 259 浏览 0 评论 0原文

对ExternalInterface.addcallback 的问题感到困惑。

主要是因为当我在浏览器中测试时,它始终在本地工作,但是当我部署到服务器时,它就停止工作了。

我添加了跟踪命令并确认在添加回调之前ExternalInterface 实际上可用,并且javascript 方法中的警报命令正确识别了flash 对象。 我还检查了allowscriptaccess 设置为“始终”。

这是否与远程服务器上提供的闪存有关?

真的很难过

Confused by a problem with 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.
I also checked and allowscriptaccess is set to 'always'.

Could it have something to do with the flash being served on a remote server?

really stumped

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

桃酥萝莉 2024-10-08 13:13:56

尝试添加 System.security.allowDomain("*"); (或者实际填写正确的域而不是 *)。给你的AS。

您已经拥有allowscriptaccess。还要确保 swf 和 html/js 来自同一主机......而不是 www.foobar.com 和 foobar.com 另一个,有时会出错。

Try adding System.security.allowDomain("*"); (or actually filling out the correct domain instead of *). To your AS.

You already have 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文