如何将Flex Air应用程序安装到全屏?

Gab*_*iël 2 apache-flex air zoom

我有一个专为1280x800设计的Flex Air应用程序,我想在1920x1200显示器上进行全屏工作.

我已经阅读了这篇文章:http://blogs.adobe.com/aharui/2008/01/flex_and_scalemodes.html并尝试了它,但它只缩放左上角(如文章中所述).

我使用WindowedApplication(如下所示),它包含一个View(称为MasterView),其中包含所有不同的布局元素.

有什么建议?

我的申请(简而言之)看起来像这样:

<mx:WindowedApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute"
    width="100%" height="100%"
    horizontalScrollPolicy="off"
    verticalScrollPolicy="off"
    clipContent="false" 
    windowComplete="goFullscreen()" 
    >

private function goFullscreen():void
{                                   
    Mouse.hide();       

    this.stage.scaleMode = StageScaleMode.EXACT_FIT;
    this.stage.align = StageAlign.TOP_LEFT;
    this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

    try
    {   
        showStatusBar = false;
        removeChild(statusBar);
    }
    catch (err:Error)
    { }

    root.stage.addEventListener(KeyboardEvent.KEY_DOWN, switchFullScreen)               
}

</mx:WindowedApplication>
Run Code Online (Sandbox Code Playgroud)

谢谢,加布

rya*_*art 5

你想全屏或只是最大化窗口?您可以通过以下方式执行后者:

this.nativeWindow.maximize();
Run Code Online (Sandbox Code Playgroud)

在全屏模式下做一些事情你不应该需要你所拥有的所有其他东西.你应该只需要打电话

  this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
Run Code Online (Sandbox Code Playgroud)

做你想做的.这不起作用吗?调用该API时屏幕看起来像什么?

=瑞恩