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

时间:2010-02-02 11:18:28

标签: flash-cs3

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

请帮帮我

1 个答案:

答案 0 :(得分:0)

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

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

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中进行这种“禁用”:你需要第三方课程或程序。

祝你好运。

相关问题