# Using variables with addEventListener \[renamed\]

**URL:** <https://forum.kirupa.com/t/using-variables-with-addeventlistener-renamed/281344>\
**Category:** flash\
**Created:** [February 8, 2009, 2:26am UTC](https://forum.kirupa.com/t/using-variables-with-addeventlistener-renamed/281344 "2009-02-08T02:26:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonlijw](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jasonlijw](https://forum.kirupa.com/u/jasonlijw)\
**Post date:** [February 8, 2009, 2:26am UTC](https://forum.kirupa.com/t/using-variables-with-addeventlistener-renamed/281344/1 "2009-02-08T02:26:46Z")

</div>

Can this be done?

[varible].addEventListener(MouseEvent.CLICK, [varible]);

If so How? I have tried 50 different ways, with no success. The names of all of my buttons are creating in a for loop and numbered from XML. I need to call each one with a single line. I cant have an event listener for 600 buttons.

thank so much
