package com.test{
import flash.display.Sprite;
import flash.display.MovieClip;
import com.greensock.*;
import com.greensock.easing.*;
import com.test.CreateRoundRectButton;
import flash.events.*;
import flash.net.*;
public class DetailView extends MovieClip {
private var detailPanel:MovieClip=new MovieClip();
private var detailData:Object;
private var closeBtn:Sprite;
private var DetailForm:DetailViewForm=new DetailViewForm();
public function DetailView() {
createPanel();
addChild(detailPanel)
detailPanel.addChild(DetailForm);
}
private function createPanel()
{
closeBtn=new CreateRoundRectButton(30,30,10,1,0xFFFFFF,"X",0x000000);
closeBtn.x=DetailForm.width - 25;
closeBtn.y=2;
closeBtn.addEventListener(MouseEvent.MOUSE_UP, closePanel,false,0,true);
DetailForm.addChild(closeBtn)
}
public function closePanel(evt:MouseEvent) {
removeChild(evt.currentTarget)
}
}
}
我怎样才能删除这个班级的孩子。当我按下关闭按钮时,它需要移除窗口。但是我没有正确地得到这个事件。我怎样才能删除这个。