如何从 JavaScript 调用 FileReference.browse()?

发布于 2024-09-03 10:18:32 字数 359 浏览 2 评论 0原文

我试图从 JavaScript 调用 FileReference 类的 browser() 方法(用户单击使用ExternalInterface 的文本来调用 Flash 中的方法)。

不幸的是,我收到一条错误,告诉我这必须是用户的直接操作(例如单击按钮)。我通过 Google 进行了搜索,意识到这是 Flash 10 中的一项新安全功能。

我能找到的唯一解决方案是在文本上放置一个 Flash 按钮或隐藏一个 Flash 按钮,这将调用 browser() 方法。

我希望浏览器仅显示 JavaScript,并且所有 Flash 代码仅从 JavaScript 调用。

请问有什么办法可以做到这一点吗?

非常感谢, 鲁迪

I am trying to call the browse() method of the FileReference class from JavaScript (a user clicks on a text that uses the ExternalInterface to call a method in Flash).

Unfortunately, I receive an error that tells me it has to be a direct action of the user (like clicking a button). I have searched through Google and realized this is a new security feature in Flash 10.

The only solutions I could find was to put a Flash button or to have a hidden flash button over the text, that will call the browse() method.

I wanted the browser only to show JavaScript and all the Flash code only called from JavaScript.

Is there please any way I could please do that?

Thank you very much,
Rudy

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

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

发布评论

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

评论(1

缱绻入梦 2024-09-10 10:18:32

我能找到的唯一解决方案是在文本上放置一个 Flash 按钮或隐藏一个 Flash 按钮,这将调用 browser() 方法。

这些唯一的解决方案。

The only solutions I could find was to put a Flash button or to have a hidden flash button over the text, that will call the browse() method.

Those are the only solutions.

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