Blade27
11-16-2009, 09:03 AM
Hi,
I'm just trying to name my 12 functions using a for loop, but its not working.
It works for the event target linked to the listener, but not for the function.
Code below
for(var m:int = 0; m<12; m++){
this["holder_thumb_" +m].addEventListener(MouseEvent.CLICK, "changeImage"+m);
}
Thanks for any help
I'm just trying to name my 12 functions using a for loop, but its not working.
It works for the event target linked to the listener, but not for the function.
Code below
for(var m:int = 0; m<12; m++){
this["holder_thumb_" +m].addEventListener(MouseEvent.CLICK, "changeImage"+m);
}
Thanks for any help