弹出窗口居中显示

1、计算坐标

adminlogin是一个自定义TitleWindow对象,在application中调用

var al:adminlogin=new adminlogin();

al.x=(Application.application.width-al.width)/2;
al.y=(Application.application.height-al.height)/2;
PopUpManager.addPopUp(al, this, true);

 

2、使用PopUpManager

PopUpManager.addPopUp(al, this, true);
PopUpManager.centerPopUp(al);

你可能感兴趣的:(弹出窗口)