I have 10 movielclips on stage with name of "mc1,mc2,mc3....". I want to apply one eventlistner on all and I was trying to call using variable but its not working when I can directly with instance name it works.
can anyone help that how can i apply one function on multiple movieclcip instances
//var mc ="mc1";
var mc = this["mc" + 1];
mc.addEventListener(MouseEvent.CLICK, testFunction);
function testFunction(e:MouseEvent):void
{
trace("Seconds elapsed: "+ e.target.name);
}