Jump to content
GreenSock

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

Change TimelineLite delay programmatically

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,

 

Is there any way to remove the delay from a tween added to a timeline? I would like to have a delay on the first tween the first time the timeline plays, but would like to remove it on subsequent plays.

Thx.

Link to comment
Share on other sites

Sure. It's probably easiest though to put the delay on the timeline when you create it and then remove it later with the delay() method as opposed to adding it to a tween and removing it.

//create the timeline with a delay
var tl = new TimelineLite({delay:1});

//later remove the delay 
tl.delay(0);

Read about the delay() method: http://greensock.com/docs/#/HTML5/GSAP/TimelineLite/delay/

  • Like 2
Link to comment
Share on other sites

You learn a new thing every day... Thanks Donna.

 

:)

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.
×