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