Share Posted December 13, 2015 Hi guys, I'm pretty new at GSAP, and I'm trying to control a timeline that tweens two classes. So what I am trying to achieve in my own Codepen linked to this post, is to control the timeline with the "progress" function. I can't wrap my head around how this is done. What am I doing wrong? The class tween example See the Pen b128c65e197e46dfa8a980d229c45114 by GreenSock (@GreenSock) on CodePen Timeline example See the Pen zinsg by GreenSock (@GreenSock) on CodePen See the Pen VevrdP by Blueblau (@Blueblau) on CodePen Link to comment Share on other sites More sharing options...
Share Posted December 13, 2015 Hi blueblau if i understood correctly , you need to pause your Tween/Timeline , pls try like this : var tl = new TimelineMax({paused:true}); tl.to(".start",1,{className:"finish"}); tl.progress(0.5); or var tl = new TimelineMax(); tl.to(".start",1,{className:"finish"}); tl.progress(0.5).pause(); 1 Link to comment Share on other sites More sharing options...
Author Share Posted December 13, 2015 You are THE man! The link to the end result is here: See the Pen VevrdP by Blueblau (@Blueblau) on CodePen 1 Link to comment Share on other sites More sharing options...
Share Posted December 13, 2015 just 2 points : - pls use last version of GSAP ( 1.18.1 ) , currently you load very old version : 1.8.4 - after version 1.8.0 , you don't need to used css:{} object for CSS properties pls check this out : See the Pen xZwpRq by MAW (@MAW) on CodePen 2 Link to comment Share on other sites More sharing options...
Author Share Posted December 14, 2015 Thank you! However, I have an issue where I'm trying to animate multiple elements at once. One works, but the second doesn't. I tried to add the CSS tween to the timeline in a different way, like the Greensock Timeline example with the Space Invader ghosts, but I think I'm doing somehting wrong, or doesn't it work with the cssPlugin? See the Pen VevrdP by Blueblau (@Blueblau) on CodePen Link to comment Share on other sites More sharing options...
Share Posted December 14, 2015 You are just setting them because the duration is 0. Set it something other than 0. See the Pen ZQbMoO by osublake (@osublake) on CodePen 1 Link to comment Share on other sites More sharing options...
Author Share Posted December 14, 2015 You are just setting them because the duration is 0. Set it something other than 0. See the Pen ZQbMoO by osublake (@osublake) on CodePen For crying out loud! I suck at this Thank you! 1 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