我正在开发Flex移动应用程序,我想在as3中设置初始窗口宽度和高度。当我的应用程序在桌面上运行时,我想检测屏幕分辨率并将其设置为窗口界限,就像这样 this.width = Capabilities.screenresolutionX this.height = Capabilities.screenresolutionY
由于
答案 0 :(得分:0)
您可以将NativeWindow的width和height属性设置为Capabilities.screenResolutionX和Capabilities.screenResolutionY
public function AppWindow()
{
var options:NativeWindowInitOptions = new NativeWindowInitOptions();
options.systemChrome = NativeWindowSystemChrome.STANDARD;
options.type = NativeWindowType.NORMAL;
super(options);
width = Capabilities.screenResolutionX;
height = Capabilities.screenResolutionY;
// to make sure content doesn't scale and aligns to top left set stage properties
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
}