Skip to main content
Participant
Dec 12, 2024 6:19 PM UTC
Question

How execute a animate only 2 times ?

Hello guys, how i can execute only 2 times a animation?, i use "stop();" when i need to see the animation only 1 time, but what command i need to use for do this only 2 times?.

Thanks mates.

    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    JoãoCésar17023019
    Community Expert
    Community Expert
    Dec 12, 2024 6:41 PM UTC

    Hi.

     

    One approach would be to place a code like this in the last frame of the animation:

    if (this.started)
        stop();
    this.started = true;

     

    Or, if your animation is within a Graphic symbol, you can extend it on the main timeline to last 2x its internal duration, set it to loop in the Properties panel and add a single stop in the last frame of the main timeline.

    Regards,
    JC

    Translate
    Participant
    Dec 12, 2024 6:43 PM UTC

    Thank you!

    Translate
    JoãoCésar17023019
    Community Expert
    Community Expert
    Dec 12, 2024 6:51 PM UTC

    You're welcome!

    Translate