# addListeners, event handler and all

**URL:** <https://forum.kirupa.com/t/addlisteners-event-handler-and-all/229598>\
**Category:** flash\
**Created:** [June 18, 2007, 9:25pm UTC](https://forum.kirupa.com/t/addlisteners-event-handler-and-all/229598 "2007-06-18T21:25:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeanmichel](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@jeanmichel](https://forum.kirupa.com/u/jeanmichel)\
**Post date:** [June 18, 2007, 9:25pm UTC](https://forum.kirupa.com/t/addlisteners-event-handler-and-all/229598/1 "2007-06-18T21:25:18Z")

</div>

May someone tell me how is it possible (if it is) to pass variables along when we addEventListeners to a component button.  
And by the way, what’s the main differences between addEventListeners and addListener?

I have a FLVPlayback component from which i wanna play 4 different flv clips referenced in a xml file.

The xml part works fine.

So I have my 4 buttons (components) here. When i click the button 1, i want to either send the variable 1 to a function that is build to load the desired flv in the player. The variable would determine which of the flv to play.

either that or when i click a button, i want to set directly the .contentPath of my flv player, load it and play it via a simple function that would be referenced to in the addEventListener call

I hope everything is clear enough.

I’m having trouble just making the buttons send different variables to a particular function, according to which of my 4 buttons are pressed.  
button 1 sends 0  
button 2 sends 1  
button 3 sends 2  
button 4 sends 3

that looks pretty simple but seems like i cant even do that by myself.

Thanks for the help again
