question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

reliable enterFrame event

See original GitHub issue

I’m creating an animation and I want to have 2 options for endings and choose the right one based on some logic. What I’m doing ATM is: AE file with that has this structure start - scene1 - endA - endB

animation.addEventListener("enterFrame", function(){
    /// if this is the end of scene1
   /// check some logic
   /// and jump to endA / endB
})

This works usually, but I found that enterFrame is no reliable - for slower machines, some frames are skipped, and the callback never gets called!

is there a workaround? (I can use any amount of code necessary).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
Yiidiircommented, Jun 11, 2020

@yonatanmn I’m using GSAP (Greensock) timeline with timeline.call() and it works great, you can hook it to lottie too 😃

0reactions
lbd226commented, May 27, 2020

Hi, I came across your profile at Toptal, I have an interesting project that I think you’ll like , appreciate if you can get back to me - Lbd226@gmail.com , Lior

Read more comments on GitHub >

github_iconTop Results From Across the Web

Myth Buster: EnterFrame Event Performance - Int3ractive
The EnterFrame events reportedly generate 1500 – 1800 event objects per minutes. ... To clear the myths about EnterFrame event performance and the ......
Read more >
Using ENTER_FRAME in Flash CS4 (AS3)
ENTER_FRAME is good for producing continuous motion or other continuous activity. ... The ENTER_FRAME event is useful for making things move smoothly via ......
Read more >
JavaScript's version of ActionScript's Event.ENTER_FRAME ...
A good substitute would be setInterval or setTimeout : function doAllTheTime() { } function wrapper() { doAllTheTime(); ...
Read more >
Is replacing Enter_Frame Event listener with Greensock Faster?
Hey everyone so I am moving a Movie Clip across the stage using Animate CC/AS3 and I was wondering which way is faster...
Read more >
Advanced Buttons and Event Handling in Adobe Flash CS5
To create continuous actions with the ENTER_FRAME event ... After you no longer need the event handler, it's good practice to use ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found