Jump to content
Search Community

continue only if not last repeat

kempo test
Moderator Tag

Go to solution Solved by Carl,

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

Hello!
 
I want to stop playing a timeline at a certain point if on the last repeat, for example..
 

var TL1 = new TimelineMax({repeat:1, repeatDelay:2.5});
TL1.set("#banner", {visibility:"visible"})
.from('#copy1', 1, {top:-20, scale: 0, ease: Power4.easeInOut})
.to('#hero', 1, {top: 250, ease: Power4.easeInOut},'-=1')
.from('#group-logos', 1, {top:-15, scale: 0, ease: Power4.easeInOut})
.from('#cta2', 1, {top:40, scale: 0, ease: Elastic.easeOut.config(1, 0.75)},'+=0.5')
.from('#hero2', 1, {left: 300, ease: Power4.easeInOut},'+=1'); // don't do this if on the last repeat
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...