Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
JREAM

Newbie Reversing Timeline

Recommended Posts

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

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

 

 

  • Like 1
Link to comment
Share on other sites

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!

  • Like 2
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.
×