# Listener's function with parameter?

**URL:** <https://forum.kirupa.com/t/listeners-function-with-parameter/260855>\
**Category:** flash\
**Created:** [May 20, 2008, 2:39pm UTC](https://forum.kirupa.com/t/listeners-function-with-parameter/260855 "2008-05-20T14:39:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![geter712](https://avatars.discourse-cdn.com/v4/letter/g/9d8465/32.png) [@geter712](https://forum.kirupa.com/u/geter712)\
**Post date:** [May 20, 2008, 2:39pm UTC](https://forum.kirupa.com/t/listeners-function-with-parameter/260855/1 "2008-05-20T14:39:15Z")

</div>

I need to know if there is a way to include parameter during function call while making listener. For example imagine that we have function **sample\_function** with parameter **func\_param** :

**var sample\_function = function(func\_param){  
trace(func\_param);  
};**

So we have **button\_1** on the stage and we want to trigger function on button press:

\*\*button\_1.addEventListener(“mouseDown”,sample\_function)

\*\*This works as long as we do not need parameter but if we include parameter during function call:

**button\_1.addEventListener(“mouseDown”,sample\_function(‘bla bla bla’))**

…movie will throw an error. Is there a way to include this parameter?
