在 Flash 快捷方式中关闭 Flash Player

发布于 2024-07-27 00:58:29 字数 56 浏览 7 评论 0原文

Flash中有关闭Flash Player的快捷方式吗? 当我每次都必须点击时,这让我沮丧得要死

Is there a shortcut for closing Flash Player in Flash? It frustrates me to the death when I have to click every time

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

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

发布评论

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

评论(3

澉约 2024-08-03 00:58:29

Flash Player 9.0.115.0 adds flash.system.System.exit ... so you can listen on any custom input event and close it, in case you are using AS3 and the according player ...

greetz

back2dos

一桥轻雨一伞开 2024-08-03 00:58:29

抱歉 back2dos,但 flash.system.System.exit 仅在 AIR 中有效。在浏览器中它会抛出异常,指示“exit 仅在独立版本中可用”。 如果您想直接退出,请关闭浏览器窗口。

但是你可以变得非常聪明,以便做更多事情...

我遇到过这样的情况,我想退出 Flash 应用程序并返回到同一页面,然后 Javascript 会执行一些工作并可能重新启动一个Flash应用程序。 为此,请在索引模板中创建一个可以从 Flash 调用的 JavaScript 函数。

args(任意数量的args)可以是您想要传递的任何内容,但底线是Javascript将重新启动同一页面,但将参数传递给它,如下所示:

添加到索引模板html:

 function relaunch(arg1, arg2){
    window.onbeforeunload = allowClose;
    var url = assembleUrl(document.URL, arg1);
    url = assembleUrl(url, arg2);
    window.open(url, "_self", "", true);
 }
 function allowClose(){}                   

好的,您现在可能还有几个问题。

首先,assembleUrl() 是一个 JavaScript 函数,您可以根据需要将参数附加到您的 url 中。 毕竟,您将编写读取和处理这些参数的 html/javascript。

其次,allowClose() 功能消除了用户退出 Flash 应用程序时的确认操作。 请注意,大括号之间没有任何东西 - 这是一个重要的怪癖。

如何在 Flash 中调用它?

 flash.external.ExternalInterface.call("relaunch", arg1, arg2);   

它就像一个魅力,不仅在旧版 Flash 中,而且在 FB4/Flash10/Spark 中也是如此。

祝你好运,
吉姆

Sorry back2dos, but flash.system.System.exit only works in AIR. In a browser it throws, indicating "exit only available in standalone". If you want to plain-old exit, close the browser window.

But you can get very clever in order to do more...

I had a situation where I wanted to exit the Flash app and return to the same page where the Javascript would then do some work and possibly relaunch a Flash app. To do this, create a javascript function in your index template that you can call from Flash.

The args (any number of args) can be anything you want to pass, but the bottom line is that the Javascript will relaunch the same page but pass parameters to it like this:

Add to your index template html:

 function relaunch(arg1, arg2){
    window.onbeforeunload = allowClose;
    var url = assembleUrl(document.URL, arg1);
    url = assembleUrl(url, arg2);
    window.open(url, "_self", "", true);
 }
 function allowClose(){}                   

Okay, you probably have a couple more questions now.

First of all, assembleUrl() is a javascript function you write to append the arguments to your url as you see fit. After all, you will be writing the html/javascript that reads and processes those args.

Secondly, the allowClose() stuff eliminates the user confirmation on exit from your Flash app. Note that the braces have nothing between them - an important quirk.

How do you call this from Flash?

 flash.external.ExternalInterface.call("relaunch", arg1, arg2);   

And it works like a charm, not only in older Flash, but in FB4/Flash10/Spark as well.

Good luck,
jim

飘落散花 2024-08-03 00:58:29

简短的回答是否定的,没有直接的捷径。

更长的答案是您可以使用 Ctrl + Enter 进行测试,然后使用 Ctrl + W 关闭(Ctrl + W 关闭 Flash 播放器窗口)。 因为 Ctrl + Enter 使测试前沿并且焦点集中在它可以工作。

对于 Mac,Command + EnterCommand + W

这对于具有较小项目的体面机器来说应该没问题,您可以在其中快速测试事物。

Well the short answer is no there is no direct shortcut.

The longer answer is you could just use Ctrl + Enter to test and Ctrl + W to close (Ctrl + W closes flash players window). Because Ctrl + Enter makes the test front and it focus's on it that could work.

Command + Enter and Command + W for Macs.

This should be fine on a decent machine with smaller projects, where you are testing things quickly.

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