2010-02-02 74 views

回答

0

首先,有没有办法禁用右键单击在Flash中,除非你使用JavaScript。一个人创造了一个通用的代码,基本上是“在Flash中禁用右键单击”允许你可以自定义它,这对游戏非常有用,并且可以增强用户和你的应用程序之间的交互性,关于这个解决方案的详细信息可以参考here(功劳归于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; 

最后,禁用窗口最大化,minize和关闭按钮,还有一些类和程序,有可以为你做这个。我强烈建议你测试Zinc Builder,看看它是否给你你想要的。在Flash中基本上没有办法做到这种“禁用”:您需要第三方类或程序。

祝你好运。