1

nativeWindow 支持 systemChrome (standard,none) 和 transparent (false,true);这些选项位于 Adob​​e AIR 应用程序描述符文件 (xml)

    <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
    <!-- <systemChrome></systemChrome> -->

    <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
    <!-- <transparent></transparent> -->

但我找不到设置窗口类型(实用程序、正常、轻量级)的选项,如 TourDeFlex 上的 Air Applications -> AIR APIs and Techniques -> Native Windows 下所示。

从应用程序中可以仅作为只读属性进行访问。

设置此属性的正确位置在哪里?

一个很好的使用示例可能是:minitask.org

谢谢!

编辑:窗口应该在 UTILITY 模式下启动

4

3 回答 3

2

您可能无法使用主应用程序窗口执行此操作。您可以使用的一个技巧是:

function MainConstructor() {

    var opt:NativeWindowInitOptions = new NativeWindowInitOptions();
    opt.type = NativeWindowType.UTILITY;

    var window:NativeWindow = new NativeWindow(opt);
    window.activate();
    window.stage.addChild(new PreviousMainConstructor());

    stage.nativeWindow.close();
}

这只是打开一个新的实用程序窗口,并关闭主应用程序窗口

于 2012-01-26T08:52:16.997 回答
1

实例化窗口时,您必须通过NativeWindowInitOptions的属性设置窗口的NativeWindowType 。type

更多信息: AIR Window Basics

于 2011-06-18T16:52:17.853 回答
-1

this.type = NativeWindowType.UTILITY;

于 2012-10-17T09:11:21.770 回答