AIR 窗口居中显示

			/******************display AIR window at center of Screen start*************************/
			import flash.system.Capabilities;
			
			//public var window:NativeWindow = new NativeWindow();
			public var screenWidth:Number = Capabilities.screenResolutionX;
			public var screenHeight:Number = Capabilities.screenResolutionY;
			private function initScreen():void{
				this.nativeWindow.x = screenWidth /2 - this.nativeWindow.width/2;
				this.nativeWindow.y = screenHeight /2 - this.nativeWindow.height/2;
			}
			/******************display AIR window at center of Screen end*************************/

你可能感兴趣的:(窗口居中)