Accessing Event Listeners In Custom Class

Hi,

Im am trying to access my event listners in my “menuButn” class from my doc class. Driving me crazy any help would be greatly appreciated…

In my main document class i have the following:

Main.as

public function xmlLoaded(event:Event):void {
var menuButn:Class=getDefinitionByName(“com.btn.menuButn”) as Class;
butn = new menuButn();
holder.addChild(butn);

}

In my “menuButn” class I have:

menuButn.as

public class menuButn extends MovieClip {
public function menuButn() {
init();
}
private function init():void {
this.buttonMode=true;
addEventListener(MouseEvent.MOUSE_OVER, butnOver);
addEventListener(MouseEvent.MOUSE_OUT, butnOut);
}
public function butnOver(event:MouseEvent):void {
trace(“over”)
}