# Put parameters in a function called by the "change" event of a combobox

**URL:** https://forum.kirupa.com/t/put-parameters-in-a-function-called-by-the-change-event-of-a-combobox/231575
**Category:** flash
**Created:** [July 5, 2007, 9:03pm UTC](https://forum.kirupa.com/t/put-parameters-in-a-function-called-by-the-change-event-of-a-combobox/231575 "2007-07-05T21:03:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![emiliet](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@emiliet](https://forum.kirupa.com/u/emiliet)
#### Post date: [July 5, 2007, 9:03pm UTC](https://forum.kirupa.com/t/put-parameters-in-a-function-called-by-the-change-event-of-a-combobox/231575/1 "2007-07-05T21:03:57Z")

</div>

Hello everyone,

As the title of my post might be a little hard to catch, let me explain a bit more…

I’ve got several combobox.  
When changing their value, each of them launch the same action, except that they do it on different clips.

Let’ say  
list1\_cb will work on clipA\_mc  
list2\_cb on clipB\_mc  
list3\_cb on clipC\_mc  
…

instead of doing  
list1\_cb.addEventListener(“change”, function1);  
list2\_cb.addEventListener(“change”, function2);  
list3\_cb.addEventListener(“change”, function3);  
…  
and than create a function function1, function2, function3 which would be the same, except acting on different clips

I would rather do  
list1\_cb.addEventListener(“change”, common\_function(clipA\_mc));  
list2\_cb.addEventListener(“change”, common\_function(clipB\_mc));  
liste3\_cb.addEventListener(“change”, common\_function(clipC\_mc));

and then, only define a function common\_function which would work on a movieclip known as a parameter.

Unofrtunately, it looks like it’s not possible to put any parameter to a function called by the “change” event on a combobox.

Would anybody have an idea about how I can do that ?

Thanks a lot to all of you who read this and tried to help me

Emilie
