Skip to main content
Participant
September 26, 2019
Question

error 1061 help

  • September 26, 2019
  • 1 reply
  • 865 views

just trying to get a button that goes to a frame then stops using the function with the same name. getting this error:1061:Call to a possibly undefined method bind through a reference with static type Function. This is my code:

 

this.stop();


this.ButtonPets.addEventListener("click", fl_ClickToGoToAndStopAtFrame_9.bind(this));

function fl_ClickToGoToAndStopAtFrame_9()
{
this.gotoAndStop(10);
}

 

    This topic has been closed for replies.

    1 reply

    JoãoCésar17023019
    Community Expert
    Community Expert
    September 26, 2019

    Hi.

     

    This is happening because you're trying to use JavaScript in an AS3 document.

     

    To fix this, go to File > Convert To > HTML5 Canvas.

     

     

    Regards,

    JC