Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Timeline pause/resume with callback

Recommended Posts


I just noticed a problem with the timeline's pause/resume functions with addCallback at the same location. For example, at "Label1" add a callback and pause at the same location. When the playhead stop at "Label1", the callback gets executed. The problem is when resume() is called to resume the playing, the same callback at "Label1" gets executed again. Is there a way to call resume without executing callback at the resume location?


Share this post

Link to post
Share on other sites

Thanks Shaun for the reply! Here is my version with slight changes from yours.

See the Pen zYYrRVd?editors=1111 by GTStan (@GTStan) on CodePen


As you can see in the console, there are two "Callback test". I found the problem, it is is line 14. It is solved with tl.pause(); without the "label1".




  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.