(1)

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

PopUpManager.centerPopUp(popUp);  

(2)

  1. var popwin:TitleWindow = new TitleWindow();
  2. PopUpManager.addPopUp(popwin,this,true);
  3. PopUpManager.centerPopUp(this);

 (3)

 

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

 

  1. private function init():void
  2. {
  3. // 可以通过this.x ,this.y 来设置位置
  4. this.x = Capabilities.screenResolutionX/2-this.width/2
  5. this.y = Capabilities.screenResolutionY/2-this.height/2 - 50
  6. }

 

 

posted on 2011-04-19 11:20  懒懒的呐喊  阅读(1213)  评论(0编辑  收藏  举报