Hi,
Trying to make a transition from as3 to as2 for a project… How can I replicate this as3 code in as2?:
for(var i:Number; i < 5; i++)
{
var mc:MovieClip = new MovieClip();
mc.name = “mc_” + i;
mc.addEventListener(MouseEvent.CLICK, handler);
}
function handler(e:MouseEvent):void
{
trace(e.currentTarget.name);
}
I know this isn’t functional, but you get the idea
Since the 2 languages seems alike except for the event model, any help would be appreciated.
Thanks