Skip to main content
Participant
October 17, 2023
Question

How do I make my button continue the rest of an animation after the button starts it?

  • October 17, 2023
  • 1 reply
  • 408 views

I'm working on a class project right now for a small 2D interactive game. I have an interactive button that makes the character jump over the hole but I can't get the rest of the classic tween of them skating after it to continue playing. Is it something in the code that it is causing it to do that? This is what I have right now. Thank you for the help.

 

this.stop();

this.jumpbtn.addEventListener("click", function (jumpbtn)
{
this.gotoAndPlay(40);
}.bind(this));

 

 

    This topic has been closed for replies.

    1 reply

    JoãoCésar17023019
    Community Expert
    Community Expert
    October 17, 2023

    Hi.

     

    Are the jumping and skating animations in the same timeline?

     

    Please let us know.

     

    Regards,

    JC

    Keashy13Author
    Participant
    October 17, 2023

    Hi! I'm not sure. I think they are. I added a photo of what it looks like. Layer 4 is the jumping tween.

     

    JoãoCésar17023019
    Community Expert
    Community Expert
    October 18, 2023

    Thanks.

     

    If you press Enter/Return in this timeline you can see your character on stage jumping and then skating?