createJS does not reconize currentTarget

13 views Asked by At

I like to clarify What is wrong in the following script:

for (i_categ=0;i_categ<stage.categories.length;i_categ++)
{
    this.btnCateg[i_categ].btnIndex = i_categ;
    this.btnCateg[i_categ].addEventListener("click", btnCategory_click.bind(this));
    this.addChild(this.btnCateg[i_categ]);

}
function btnCategory_click(evt)
{
    evt.currentTarget.gotoAndStop("Selected");
}

Uncaught TypeError: Cannot read properties of undefined (reading 'gotoAndStop')

It worked before. It just stops working with no any modifications

0

There are 0 answers