Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How execute a animate only 2 times ?

New Here ,
Dec 12, 2024 Dec 12, 2024

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.

188
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 12, 2024 Dec 12, 2024

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 12, 2024 Dec 12, 2024

Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 12, 2024 Dec 12, 2024
LATEST

You're welcome!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines