Привет я нарисовал кнопочку закрытия окна которая должны при нажатии выполнять функцию removeMenu(в которой выполняется кучу removeChild())
Почему не вызывается функция removeMenu При клике по квадратику с крестиком который рисуется?
Вот вызов и слушатель Эвента

Код AS3:
this.addCloseButton();
this.closeButton.addEventListener(MouseEvent.CLICK,removeMenu);
Вот сама кнопка:

Код AS3:
private function addCloseButton()
{
this.closeButton = new Shape ;
this.closeButton.graphics.beginFill(0x000000);
this.closeButton.graphics.lineStyle(NaN,0,1.0,true);
this.closeButton.graphics.drawRoundRect(this.sizeX + this.dx - 20,this.dy + 10,10,10,2);
this.closeButton.graphics.endFill();
this.closeButton.graphics.beginFill(0xFFFFFF);
this.closeButton.graphics.lineStyle(1,0xFFFFFF,1,false,LineScaleMode.VERTICAL,CapsStyle.NONE,JointStyle.MITER,10);
this.closeButton.graphics.moveTo(this.sizeX + this.dx - 18,this.dy + 12);
this.closeButton.graphics.lineTo(this.sizeX + this.dx - 12,this.dy + 18);
this.closeButton.graphics.moveTo(this.sizeX + this.dx - 12,this.dy + 12);
this.closeButton.graphics.lineTo(this.sizeX + this.dx - 18,this.dy + 18);
this.closeButton.graphics.endFill();
addChild(this.closeButton);
}