Jump to content
GreenSock

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

How to add delay when .play() is called?

Recommended Posts

Is it possible to delay the start of animation when the .play() method is invoked?

 

E.g.

 

I have an animation that is paused:

 

tlAnim = new TimelineMax({paused:true});

    tlAnim
      .from($intro, 0.5, {css:{scale: 0}, ease: Power2.easeOut})
      .from($img, 1.5, {opacity: 0, rotation: -180, ease: Power4.easeOut});     

At a later part, when .play() is called, I don't want the animation to start right away. Maybe there's a .50 seconds delay before it starts. Do I add something to the .play() method? Or do I indicate it inside the tlAnim timeline?

 
Link to comment
Share on other sites

Hi iamacatperson :)

 

The easiest way to make that happen is by adding a delay to the timeline:

tlAnim = new TimelineMax({paused:true, delay:0.5});

Happy tweening.

 

:)

  • Like 1
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.
×