Flash隐藏鼠标右键单击和关闭控制按钮

发布于 2024-08-19 15:15:03 字数 71 浏览 2 评论 0原文

我如何在运行时修复 swf 文件的舞台大小(不应该右键单击屏幕,不应该有任何最小化、最大化和关闭按钮,

请帮助我

how can i fix the stage size of a swf file while it run (there should not be right click on the screen, there should not be any minimize, maximize and close button

please help me

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

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

发布评论

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

评论(1

多像笑话 2024-08-26 15:15:03

首先,除非您使用 JavaScript,否则无法在 Flash 中禁用右键单击。有人创建了一种通用代码,基本上“禁用 Flash 中的右键单击”,允许您对其进行自定义。这对于游戏来说非常有用,并且可以增强用户和应用程序之间的交互性。有关此解决方案的详细信息可以在此处(归功于 Uza)。这样做有一个缺点:此代码仅适用于在 Web 浏览器(例如 Firefox 和 Internet Explorer)上运行的 Flash 应用程序。

除非您使用全屏和/或缩放,否则无法动态更改舞台高度和宽度。为此,请使用以下代码:

import flash.system.fscommand;
    /***********************************
    *fullscreen flash system command   *
    * "true" sets you to full screen,  *
    *"false" sets you to windowed mode.*
    ***********************************/

    fscommand("fullscreen", "true");   //default to false;

    /***********************************************************************
    *allowscale flash system command                                       *
    * "true" scales your application depending on the size of the window,  *
    * fullscreen or not.                                                   *
    *                                                                      *
    *"false" does not scale your application, regardless of                *
    * the size of the window, full screen or not.                          *
    ***********************************************************************/

    fscommand("allowscale", "true");  //default to true;

最后,至于禁用窗口中的最大化、最小化和关闭按钮,有许多类和程序可以为您执行此操作。我强烈建议您测试一下Zinc Builder,看看它是否能满足您的需求。基本上没有办法单独在 Flash 中进行这种“禁用”:您需要第三方类或程序。

祝你好运。

First off, there is no way to disable the right-click in Flash, unless you use JavaScript. One person has created a universal code that basically "disables right-clicking in Flash", allowing you to customize it. This is great for games and to enhance the interactivity between the user and your application. The details about this solution can be found here (credit goes to Uza). There is a downside to this: this code only works for flash applications that are running on a web browser, such as Firefox and Internet Explorer.

It is not possible to change your stage height and width dynamically, unless you use full screen and/or scaling. To do that, use the following code:

import flash.system.fscommand;
    /***********************************
    *fullscreen flash system command   *
    * "true" sets you to full screen,  *
    *"false" sets you to windowed mode.*
    ***********************************/

    fscommand("fullscreen", "true");   //default to false;

    /***********************************************************************
    *allowscale flash system command                                       *
    * "true" scales your application depending on the size of the window,  *
    * fullscreen or not.                                                   *
    *                                                                      *
    *"false" does not scale your application, regardless of                *
    * the size of the window, full screen or not.                          *
    ***********************************************************************/

    fscommand("allowscale", "true");  //default to true;

Finally, as for disabling the maximize, minize and close buttons in the window, there are a number of classes and programs out there that can do this for you. I strongly suggest you test out Zinc Builder and see if it gives you what you want. There is basically no way to do this kind of "disabling" in Flash alone: you need a third party class or program.

Good luck.

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