Inside a loop I connect a single click eventlistener to multiple objects. Inside the event listener I need to know what Button or MovieClip is clicked on.
In AS3 I used event.target.name and it looks like createjs supports this because the property .name exists for all objects.
But the problem is that the name property is null in every object. I tried adding .name inside the exported js and that works, but to edit that file is not really an option.
I use this code for example :
for (i = 1; i <= 150; i++){
myMC["childMC" + i].addEventListener("click",onChildClick);
}
function onChildClick(event){
alert('clicked target' + event.target.name);
}
Is this a bug or something or better yet, is there a workaround?