Jump to content
Search Community

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

Posted

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.

Posted

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
Posted

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

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...