Jump to content
Search Community

put a pause in a timeline?

Nico D
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

Posted

Hi,

 

is it possible to put a pause in a timeline (like a stop() in a Flash-timeline) ?

When I use tl.pause() it is not doing that.

Is there a built-in way or workaround to accomplish this?

 

Thanks!

Nico

Posted

Sure, you can use the call() method of TimelineLite to trigger the pause() method of your timeline:

 

 

 

var tl = new TimelineLite();


tl.to("#box1", 1, {rotation:360})
  //function, params, scope
  .call(tl.pause, [], tl)
  .to("#box1", 1, {left:200});
 

Demo: 

See the Pen cf4be20ad58580860e131225a570726c by GreenSock (@GreenSock) on CodePen.

  • Like 1

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