Jump to content
GreenSock

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

set delay to TimelineLite?

Recommended Posts

How do I set animation delay to using timelineLine?

 

I have an animation that store inside slideUpTemplate instance

 

/*========================================*/

var slideUpTemplate = new TimelineLite({
paused:true,
onComplete:animationComplete,
onReverseComplete:animationCompleteRev
});
/*========================================*/
 
I've an button that will hover in and out event attached to it, and call slideUpTemplate.play() and slideUpTemplate.reverse() respectively.
 
My problem is when I hover out I want the animation to delay for 1second before triggering the slideUpTemplate.reverse() method.
 
My initial thought was to use slideUpTemplate.delay(1).reverse() but it only works for the 1st time.....
Link to post
Share on other sites

Yeah, without seeing an example it sounds like Chrysto's advice is best.

 

You can't tell a timeline to wait to reverse, but you can wait to tell it to reverse.

DelayedCall() simply waits a set amount of time before calling a function.

Link to post
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.

×