# Eventlisteners passing variables

**URL:** <https://forum.kirupa.com/t/eventlisteners-passing-variables/327897>\
**Category:** Uncategorized\
**Created:** [April 4, 2012, 2:30pm UTC](https://forum.kirupa.com/t/eventlisteners-passing-variables/327897 "2012-04-04T14:30:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [April 4, 2012, 2:30pm UTC](https://forum.kirupa.com/t/eventlisteners-passing-variables/327897/1 "2012-04-04T14:30:50Z")

</div>

hi … i need to attach an event listener, and have its handler have a variable passed into it …  
this possible?

```auto
mc.addEventListener(Mouse.Event.ROLL_OVER, over(obj) );
function(e:MouseEvent,obj:Object):void{
e.removeEventListener(....);
trace(obj);
}

```

… sommint like that … as3 says function is static, missing argument etc … there may be other ways about it - but it is crucial to my setup, as when the EL is added, the object passed is only obtainable at that point.

yesno’s?:cowboy:
