Jump to content
Search Community

reverse timeline with a delay and pause event

zozo 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

Hi, 

 

I have a logo that is revealed with a Timeline. 

When a video start, I want to wait 4 sec, and call the reverse on the timeline. 

To complicate things I want to pause the reverse in case you pause the video (or when it buffer), in order to have my reverse called only when the video has played 4 sec. 

 

for now I'm using this on video play  

TweenMax.delayedCall(4, function() {
          drawLogoWhite.reverse()
 });

 

But of course, if the video is paused, the delayedCall isn't paused. how can I do ? 

 

Thanks,

Best.

 

 

Link to comment
Share on other sites

A delayedCall() creates and returns a TweenLite tween. You can create a reference to that tween and control it like any other with play(), pause(), resume() etc

 

try:

var delay = TweenMax.delayedCall(4, function() {
          drawLogoWhite.reverse()
 });

//when the user pauses your video use
delay.pause()

//to resume the delay use
delay.resume();

 

 

 

 

 

  • Like 3
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...