I have to do this code 103 times, but I can't create a function so I don't have to write it for each of the buttons (working with animate-cc + createjs).
this.Box1.addEventListener("click", click1.bind(this));
function click1() {
this.parent.nombres.gotoAndStop(1);
}
this.Box2.addEventListener("click", click2.bind(this));
function click2() {
this.parent.nombres.gotoAndStop(2);
}
this.Box3.addEventListener("click", click3.bind(this));
function click3() {
this.parent.nombres.gotoAndStop(3);
}
I appreciate your help in advance.