Jump to content
Search Community

seek() triggers intermediate tweens but not functions

annam test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello :)

 

We have a situation where we might want to suddenly seek to the end a timeline instance with no transitions. we need everything in the timeline to happen, just in 0 duration.

 

so we use timeline.seek(totaltime);

 

This works great for the tweens in the timeline, they all transition to their ending point, even the ones who have not yet been initialized.

 

However, the functions in the timeline are not triggered. 

 

check out this jsfiddle, we need the count to get updated even if the transition is forced to a stop: http://jsfiddle.net/annam/NNUm7/2/

 

i understand that this might be required behaviour.. but is there any way to force the functions to trigger?

 

thanks a lot!

Link to comment
Share on other sites

Hi,

 

Just set the supress event boolean to false in the seek method, by default is set to true, that will honour the callbacks and function the timeline and any nested child in it, could have. Like this:

var tl = new TimelineMax();

tl.seek(totaltime, false);

Keep in mind that every method of this type (play, reverse, resume, restart, pause, time) have this boolean when they are used to jump to a specific position in the tween/timeline or in their particular cases to set the position of the playhead.

 

Best,

Rodrigo.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...