无法在本地主机上的 Action Script 3.0 中使用 FlashExternalInterface

发布于 2024-09-11 07:20:10 字数 629 浏览 1 评论 0原文

我有一个 flash 文件,它从网络摄像头捕获图像并将其发送到服务器。该文件在 ActionScript 2.0 下工作正常,但在 3.0 下我收到未指定错误,并且调试器在返回 eval 时崩溃:

function __flash__addCallback(instance, name) {
  instance[name] = function () { 
    return eval(instance.CallFunction("" + __flash__argumentsToXML(arguments,0) + ""));
  }
}

我尝试将 localhost 添加到闪存安全管理器中的受信任站点列表中 http://www.macromedia.com/support/documentation/ en/flashplayer/help/settings_manager04.html

我还尝试使用对象标记中的allowScriptAccess 和allowNetworking 设置。

I have a flash file which captures an image from a webcam and sends it to the server. This file works fine under ActionScript 2.0 but under 3.0 I get an Unspecified Error and the debugger crashes on the return eval in :

function __flash__addCallback(instance, name) {
  instance[name] = function () { 
    return eval(instance.CallFunction("" + __flash__argumentsToXML(arguments,0) + ""));
  }
}

I've tried adding localhost to the list of trusted sites in the flash security manager
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

I've also tried playing with the allowScriptAccess and allowNetworking settings in the object tag.

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

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

发布评论

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

评论(2

难忘№最初的完美 2024-09-18 07:20:10

我已经解决了我自己的问题。事实证明,这与沙箱无关,而是代码中的错误。 Flash 文件中发生的任何错误都将在 Javascript 调试器中显示为未指定错误。

I've solved my own problem. Turns out that it was not related to the sandboxing but was an error in the code. Any error that occurs in the flash file will turn up in the Javascript debugger as an unspecified error.

煞人兵器 2024-09-18 07:20:10

可能是一个愚蠢的问题,但是您检查了发布设置吗?我这么问是因为您没有提到它,并且您需要在受信任区域生效之前将其设置为本地(如果您想要网络访问,则需要将其设置为网络访问)。

此外,您可能还需要将文件夹设置为受信任区域,并且

as2 和 as3 之间存在相当多的安全更改,因此最好阅读一下...
https://www.adobe.com/ap/products/flashplayer/articles /本地内容/

might be a silly question, but did you check the publish settings? I'm asking because you didn't mention it, and you need to set it to local (or network access if you want network access) before the trusted zones take effect.

Also you might need to set the folder to a trusted zone as well

there are quite a few security changes between as2 and as3 so it's good ta have a read ...
https://www.adobe.com/ap/products/flashplayer/articles/localcontent/

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