我有一个专为 1280x800 设计的 Flex 中的 Air 应用程序,我想拉伸它以在 1920x1200 显示器上全屏工作。
我读过这篇文章: http: //blogs.adobe.com/aharui/2008/01/flex_and_scalemodes.html并尝试过,但它只放大左上角(如文章中所述)。
我使用一个 WindowedApplication(如下所示),它包含一个包含所有不同布局元素的视图(称为 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>
谢谢, 加布