LocalConnection 在本地浏览器中工作,但不在远程站点中工作

发布于 2024-08-18 16:50:05 字数 211 浏览 8 评论 0原文

对 LocalConnection 的不稳定行为感到非常困惑。 使用使用 localConnection 工作的调试实用程序(LuminicBox)。

当包含 swf 的页面在本地浏览器中加载时,localConnection 就会起作用。

当在远程站点上“实时”查看相同的页面和 swf 时,localConnection 会失败。

有人遇到过这种情况吗??

Really puzzled by the flaky behavior of LocalConnection.
Using a debug utility(LuminicBox) that uses localConnection to work.

When the page containing the swf is loaded in a browser locally , localConnection works.

When the identical page and swf are viewed 'live' on a remote site, localConnection fails.

Anyone encounter this??

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

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

发布评论

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

评论(3

花间憩 2024-08-25 16:50:05

默认情况下,LocalConnection 允许从同一域加载的 swf 之间进行通信。当您在浏览器中加载 swf 时,还必须从同一域将调试实用程序加载到浏览器中。

您可以让 LocalConnection 跨域工作,但它需要更多配置。这是有关该主题的 Flex 文档的链接。 Flash/Flex 也存在同样的问题。

http://livedocs.adobe.com/flex/3/ langref/flash/net/LocalConnection.html

By default LocalConnection allows communication between swfs loaded from the same domain. When you're loading the swf in the browser, the debug utility also has to be loaded in the browser from the same domain.

You can get LocalConnection to work across domains but it requires more configuration. Here's a link to Flex's docs on the subject. This issue is the same for Flash/Flex.

http://livedocs.adobe.com/flex/3/langref/flash/net/LocalConnection.html

蓬勃野心 2024-08-25 16:50:05

我尚未使用 LuminicBox,但如果您有权访问初始化接收 LocalConnection 对象的代码,请调用 allowDomain("your.domain" ) 在该对象上。

var lc:LocalConnection = new LocalConnection()
lc.allowDomain("your.domain.com");
//or even better - allow all domains
lc.allowDomain("*");

如果接收 SWF 托管在 HTTPS 页面上,而发送者托管在普通页面上,则需要调用 allowInsecureDomain

lc.allowInsecureDomain("your.domain.com");

I haven't used LuminicBox, but if you have access to the code that initializes the receiving LocalConnection object, call allowDomain("your.domain") on that object.

var lc:LocalConnection = new LocalConnection()
lc.allowDomain("your.domain.com");
//or even better - allow all domains
lc.allowDomain("*");

If the receiving SWF is hosted on an HTTPS page and the sender on a normal page, you need to call allowInsecureDomain.

lc.allowInsecureDomain("your.domain.com");
假情假意假温柔 2024-08-25 16:50:05

我认为问题的一部分是我无权访问初始化接收 LocalConnection 对象的代码,只能访问发送 LC(我的应用程序)。

不过,我假设调试实用程序的作者肯定会使用 lc .allowDomain("*"); 将进一步检查,

我知道的唯一另一个原因是当您尝试打开一个新连接时,现有的 LC 连接已打开。

I think part of the problem is that I DON"T have access to the code that initializes the receiving LocalConnection object, just the sending LC (my application).

I would assume though, that the author of the debug utility would have definitely used lc.allowDomain("*"); Will check further.

The only other cause I am aware of is having an existing LC connection already open, when you try and open a new one.

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