http://www.learningactionscript3.com/2008/11/11/passing-arguments-with-events/
// create function with variables to be passed to it. function isBtn(myTarget:Object, myMessage:String) { // functions function btnClick(evt:MouseEvent) { trace("click: " + evt.target.name); trace(myMessage); } // events myTarget.addEventListener(MouseEvent.CLICK,btnClick); } // creating buttons and passing simple strings isBtn(btn1, "hello1"); isBtn(btn2, "hello2"); isBtn(btn3, "hello3"); isBtn(btn4, "hello4");