Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

218
Views
Phaser 3: Play animation after previous animation finished

I tried playing an animation after the previous animation is finished using the animationcomplete event. However that event seems to trigger on the animation inside the event itself as well, causing an endless loop.

How can I play two subsequent animations instead?

character.sprite.play("ball_out").on('animationcomplete', () => {
    character.sprite.play("feather_in");
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Apparently using

character.sprite.play("ball_out").once('animationcomplete', () => {
   character.sprite.play("feather_in");
});

fixed the issue! (Note the once in lieu of on)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!