添加提示框部分代码

btn_test.addEventListener(MouseEvent.CLICK, clickHandler);
 
function clickHandler(evt:MouseEvent):void {
var win:MovieClip = new window();
win.x = 0;
win.y = 0;
 
win.btn_close.addEventListener(MouseEvent.CLICK, closeHandler);
addChild(win);
}
 
function closeHandler(evt:MouseEvent):void {
removeChild(evt.currentTarget.parent);

你可能感兴趣的:(代码)