Skip to main content
Participant
Oct 17, 2023 11:44 PM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

    9 replies

    JoãoCésar17023019
    Community Expert
    Community Expert
    Oct 17, 2023 11:50 PM UTC

    Hi.

     

    Are the jumping and skating animations in the same timeline?

     

    Please let us know.

     

    Regards,

    JC

    Translate
    Keashy13Author
    Participant
    Oct 17, 2023 11:53 PM UTC

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

     

    Translate
    JoãoCésar17023019
    Community Expert
    Community Expert
    Oct 18, 2023 12:19 AM UTC

    Thanks.

     

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

    Translate