方案一:
[code]// 要传递的参数
var value:int = 100;
// 触发事件的按钮
var btn:Btn = new Btn;
btn.addEventListener(MouseEvent.CLICK,clickHandler(value));

// 返回事件处理的函数
function clickHandler(v:int):Function
{
return function (e:MouseEvent):void{
//处理传入的参数 V
doSomeThing(v);
}
}
[/code]
方案二-代理类:
[code]
/**
*@author:Amyflash
* @example:
* import com.JEventDelegate
stage.addEventListener(MouseEvent.MOUSE_OVER,JEventDelegate.create(yourHandler,"t1","t2"));
function yourHandler(e:MouseEvent,...arg) {
trace(e)
trace(arg)
}
*/

package {
public class JEventDelegate {
public function JEventDelegate() {
}
public static function create(f:Function,...arg):Function {
var F:Boolean=false;
var _f:Function=function(e:*,..._arg){
_arg=arg
if(!F){
F=true
_arg.unshift(e)
}
f.apply(null,_arg)
};
return _f;
}
public static function toString():String {
return "Class JEventDelegate";
}
}
}
[/code]
方案三-扩展事件类