//要监听的方法
//参数str也可以是对象
private function ABCButtonListener(e:MouseEvent,str:String):void
{
Alert.show(str);
}
//添加一个按钮,并向它添加事件
var btn:Button=new Button();
btn.addEventListener(MouseEvent.CLICK,function(e:MouseEvent):void{ABCButtonListener(e,"kkk");});
//参数str也可以是对象
private function ABCButtonListener(e:MouseEvent,str:String):void
{
Alert.show(str);
}
//添加一个按钮,并向它添加事件
var btn:Button=new Button();
btn.addEventListener(MouseEvent.CLICK,function(e:MouseEvent):void{ABCButtonListener(e,"kkk");});