Share Posted February 2, 2017 Hey there, I'm just getting started with GSAP and so far loving it! But there's one thing I couldn't get figure yet and I can't find any example online: tween repetition inside a timeline without stuck it I mean: var timelineChain1 = new TimelineMax(); timelineChain1.to("#timeline-1 .el", .2, {autoAlpha:1}) /*STEP 1*/ .to("#timeline-1 .el", .2, {scale:.8, repeat:-1, yoyo:true}) /*STEP 2*/ .staggerTo("#timeline-1 .el", .2, {x:-20}, .2 ); /*STEP 3*/ What happens: step 1 runs ok, then the timeline get stuck in the repeatition of step 2, so step 3 never happens. What I want: the infinity repetition to continue as the timeline goes on. Is it possible? Thanks and keep going! Link to comment Share on other sites More sharing options...
Share Posted February 2, 2017 Hi immarcelo Welcome to the GreenSock forum. There would be a few ways to make that happen. You could put the repeating timeline into a function and call it when you need it. You could set a hard coded start time for the tweens. You could also use recent() and endTime(). All those solutions were discussed in a similar thread here: https://greensock.com/forums/topic/13717-infinitly-repeating-tween-stops-timeline/ I'm confident one of those solutions will work well for you. Happy tweening. 2 Link to comment Share on other sites More sharing options...
Author Share Posted February 3, 2017 Thanks a lot ! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now