本地使用ExternalInterface的方法?
我有一个大问题。我已经在这个网站上搜索过答案,但现在没有发现任何对我真正有用的东西。
问题是这样的:我有一个 swf 嵌入在 html 中。我必须通过ExternalInteface 从swf 调用页面中的js 函数。好的。但它必须在本地为任何用户工作,而不需要执行任何操作。那是因为这个东西必须以cdrom的形式分发。
有没有办法避免在本地运行ExternalInterface 的问题,而不要求用户配置受信任的文件夹或类似的东西?
谢谢
I've got a big problem. I already searched this site for answers, but found nothing really useful for me now.
The problem is this: I have an swf embedded in an html. I must call a js function in the page from the swf via ExternalInteface. Ok. But it must work locally, for any user, without doing nothing. That's because this thing must be distributed in cdroms.
Is there a way to avoid the problem of running ExternalInterface locally without asking the user to configure a trusted folder or things like that?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为没有可靠的方法来解决这个安全措施。您可以在 CD 上提供一个或多个轻型 Web 服务器(每个受支持的操作系统一个),以及启动它们的方法(批处理文件或等效文件)+ 打开浏览器到服务器(例如,在某个不起眼的端口使用 127.0.0.1)。
There is no reliable way around this security measure I think. You could ship one or more light webservers on the CD (one per supported OS), and ways to start them (batch files or equivalent) + open the browser to the server (eg using 127.0.0.1 at some obscure port).
乔纳坦·赫德伯格是正确的。您无法通过闪存规避此安全功能。但是,您可以使用 MDM zinc 等产品来创建功能更强大的可执行文件,或者将项目创建为 adobe Air 项目。这两者都授予用户扩展的本地权限,其中包括在用户计算机上启动可执行内容的能力。
以下是一些程序,可以通过打包不需要安装即可运行的自定义投影仪来帮助您解决问题:
链接到锌
http://www.multidmedia.com/software/zinc/
链接到 MProjector
http://www.screentime.com/software/flash-projector
链接到 SwfStudio
http://www.northcode.com/
Johnatan Hedborg is correct. You cannot circumvent this security feature from flash. However, you could use a product such as MDM zinc to create an executable that has more power, or create the project as an adobe Air project. Both of these grant the user extended local permissions, which include the ability to launch executable content on the users machine.
Here are some programs that could help you solve your problem by packaging a custom projector that does not require an install to run:
Link to zinc
http://www.multidmedia.com/software/zinc/
Link to MProjector
http://www.screentime.com/software/flash-projector
Link To SwfStudio
http://www.northcode.com/
了解如何启用控制对脚本的访问。
Read about enabling controlling access to scripts.
难道您不能只在 CD 上包含一个网页并让他们打开该网页而不是 SWF 吗?
Can't you just include a web page on the CD and have them open that instead of the SWF?