# Addeventlistener with multiple events?

**URL:** <https://forum.kirupa.com/t/addeventlistener-with-multiple-events/326396>\
**Category:** Uncategorized\
**Created:** [December 11, 2011, 5:06pm UTC](https://forum.kirupa.com/t/addeventlistener-with-multiple-events/326396 "2011-12-11T17:06:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_Rolim](https://avatars.discourse-cdn.com/v4/letter/i/f4b2a3/32.png) [@Igor\_Rolim](https://forum.kirupa.com/u/Igor_Rolim)\
**Post date:** [December 11, 2011, 5:06pm UTC](https://forum.kirupa.com/t/addeventlistener-with-multiple-events/326396/1 "2011-12-11T17:06:46Z")

</div>

Its possible addeventlisterne with two or more listerners?  
I have this code…

Box\_01.addEventListener(MouseEvent.CLICK,clickVid);  
Box\_02.addEventListener(MouseEvent.CLICK,clickVid);  
so on…

Box\_01.addEventListener(MouseEvent.MOUSE\_OVER,overBtn);  
Box\_02.addEventListener(MouseEvent.MOUSE\_OVER,overBtn);  
so on…

Box\_01.addEventListener(MouseEvent.MOUSE\_OUT,outBtn);  
Box\_02.addEventListener(MouseEvent.MOUSE\_OUT,outBtn);  
so on…

With one function to each mouse event.

But the buttons go of “box\_01” to “box\_15” and the code was very long.  
Is there any way to put more than one listener for each event? Example:

Box\_01.addEventListener(MouseEvent.CLICK, clickVid; MouseEvent.MOUSE\_OVER, overBtn);

Appreciate the help!
