I dynamically create images in a loop (flash builder 4.5) and when I set mouse click event, I'm using this:
image.addEventListener(MouseEvent.CLICK, function(e:MouseEvent):void{fromThumbnail(e,i)});
to pass i
. However, when I click on any image, the function thumbnail prints the last i
.
Is there solution for this problem?