Share Posted June 12, 2017 Hey Guys, Im quite new to GreenSock. Years ago a friend boasted about it when Flash was very popular, it was to defacto go-to library. So I'm trying to pick up a little bit as a hobby. I was wondering if anyone could assist me in understanding what I'm doing wrong here in my CodePen. I am simply trying to "Reverse" or "Yoyo" it back, so it keeps going back and forth. I tried several ways but I am certainly getting it wrong See the Pen XgKjmG by jream (@jream) on CodePen Link to comment Share on other sites More sharing options...
Share Posted June 12, 2017 Hi and welcome to the GreenSock forums, Sounds like you just need to set yoyo:true in the TimelineMax constructor like this: tl = new TimelineMax({repeat: -1,yoyo:true}); See the Pen yXJVEO?editors=0010 by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
Share Posted June 12, 2017 You can also experiment with having each tween repeat, instead of repeating the whole timeline See the Pen gRMLjq?editors=0010 by GreenSock (@GreenSock) on CodePen 3 Link to comment Share on other sites More sharing options...
Author Share Posted June 12, 2017 Wow thats cool, easier than I thought! That single tween thing @Carl is also very cool. I have to get used to visualization a timeline in my head or something, ha. Thanks! 2 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