1. //获取到得是屏幕的分辨率
private var ScreenHeight:Number = flash.system.Capabilities.screenResolutionY;
private var ScreenWidth:Number = flash.system.Capabilities.screenResolutionX;
2.窗口初始化时,用move()方法移动到中心
this.move(ScreenWidth/2-this.width/2, ScreenHeight/2-this.height/2); //(this当前窗体)
本文出自 “爱死寂寞人” 博客,请务必保留此出处http://chcchb.blog.51cto.com/3592607/1385074
flex 桌面程序运行时居中显示,布布扣,bubuko.com
原文:http://chcchb.blog.51cto.com/3592607/1385074