In AS3, an addEventListener listener automatically passes an event object argument to the handler function, but it can’t pass any other arguments. If you want to pass arguments to an event handler, here’s a way to do it: see the code:
var sayHello:String = “欢迎光临www.FlashJ.cn -Flash,Ria技术博客”; btn1.addEventListener(MouseEvent.CLICK,function (e:MouseEvent){clickHandlerWithArg(e,sayHello)}); function clickHandlerWithArg(e:MouseEvent,arg:String):void { var out:String= e.target + “发出事件(有参数) :” + arg; trace(out); }

Example source file: listener.rar

What I personally tend to do is just declare a module-level variable to hold the arguments I want to pass.