0

我想用我的服务器创建一个 pm 系统。我怎样才能让它工作?这是我的概念

public function messagePopUp(_userName:String,_target:String,msg:String):void{
//Server sends _userName the person who sent the pm, _target which is you, and a msg (pm)
            if(_target == _username){
//Server checks if you're the _target so popUp will show up
//If it does create the pop up and set window title and the msg in popUp chatTxt text area
                var win:Window = new Window()
                win.title = _userName
                win.chatTxt.text = msg;
                PopUpManager.addPopUp(win,this,false)
                PopUpManager.centerPopUp(win);
            }
        }
4

1 回答 1

0

如果我正确理解您的问题:

使用可以绑定到 UI 元素的公共变量创建一个面板(mx:titlewindow 有效)。当你创建它时,用你的值填充它。

示例: http ://www.riacodes.com/flex/build-a-popup-window-with-flex/

因此,您只需将代码更改为:

var mywin:MyWindowClass = new MyWindowClass();

于 2012-12-08T19:32:28.340 回答