Now I have this code which is loading all the images from the xml file into a container and I need to set some ID to track which image should be opened bigger in another MC.
And I also need to use this ID to when user hovers mouse over an image it scales up a little using tweener.
private function loadThumbs():void
{
for(var j:uint = 0; j < thumbs.length ;j++)
{
MC = new MovieClip();
MC.name = "number " + j;
MC.x = j * thumbsSize;
imgLoader = new Loader();
imgLoader.load(new URLRequest(thumbs[j]));
MC.addEventListener(MouseEvent.CLICK, onClick);
MC.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
MC.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
MC.addChild(imgLoader);
container.addChild(MC);
}
addChild(container);
}
When I trace MC.name at onClick event it shows the instance name.
How should I do?