Identify an instance by the name
Hi.
In an HTML5 canvas document, I'm trying to identify an element using the name when I click it. In AS3 the name property (evt.target.name) is the same instance name. With EaselJS seems to be different. I can use the name property for assign a name but I can't recover the name with evt.target.name. How can I do it?
this.circle.name = "orange";
this.circle.addEventListener("click", test.bind(this));
function test(evt) {
console.log(evt.target.name); //This doesn't works. Return null.
}
Thanks.
