您的位置:首页 > 其它

[转]Flex中TitleWindow居中方法

2011-04-19 11:20 337 查看
(1)

var popUp:content=content(PopUpManager.createPopUp(this,content,true));
popUp.width = 500;
popUp.height = 300;
popUp.showCloseButton=true;
PopUpManager.centerPopUp(popUp);

(2)

var popwin:TitleWindow = new TitleWindow();

PopUpManager.addPopUp(popwin,this,true);

PopUpManager.centerPopUp(this);
(3)

<mx:TitleWindow id="titleWindow_popUp" status="单击图片选择聊天表情" height="200" showCloseButton="true" creationComplete="init();">

private function init():void

{

// 可以通过this.x ,this.y 来设置位置

this.x = Capabilities.screenResolutionX/2-this.width/2;
this.y = Capabilities.screenResolutionY/2-this.height/2 - 50;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: