# Pass a param within and addeventlistener

**URL:** <https://forum.kirupa.com/t/pass-a-param-within-and-addeventlistener/276149>\
**Category:** Uncategorized\
**Created:** [November 23, 2008, 7:49pm UTC](https://forum.kirupa.com/t/pass-a-param-within-and-addeventlistener/276149 "2008-11-23T19:49:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ventoline](https://avatars.discourse-cdn.com/v4/letter/v/dec6dc/32.png) [@ventoline](https://forum.kirupa.com/u/ventoline)\
**Post date:** [November 23, 2008, 7:49pm UTC](https://forum.kirupa.com/t/pass-a-param-within-and-addeventlistener/276149/1 "2008-11-23T19:49:02Z")

</div>

hello,  
i’m stuck in the same thing over and over again, I’ve found some wobly ways around it but there must be a proper way, please help!  
I have a property for a movieclip  
button.numero  
and want to pass it when clicked  
button.addEventListener(MouseEvent.CLICK, display )  
private function display(evt:MouseEvent){ …

```auto
... 
		button.numero = i;
		button.addEventListener(MouseEvent.CLICK, display )
		addChild(button);
		
		}

	
}

private function display(evt:MouseEvent){
		 trace(evt.target.numero);
...

```
