Jump to content
Search Community

Reverse Current & Play other Timeline on Click

Victor Work test
Moderator Tag

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

Hello GSAPers,
I  need a very important help.
I'd like to know the best way to make alternate transitions between Timelines. Example: I click on the Go Red button to run the red timeline, and when I click on the Go Yellow button it will reverse the current timeline and start the required timeline.

Is there a way to do this only with one Timeline?

See the Pen zzdJGY by Noturnoo (@Noturnoo) on CodePen

Link to comment
Share on other sites

@Dipscom

 

Hello,

Sorry, I was using the translator, I'm Brazilian.
I already managed to do what I wanted, in my case it was to have an animation of entrance and to have another animation of exit.
Now I would like to have a way for the timeline to reverse through all the tweens and stop at the required action.
Example: https://www.reed.be/

 

 

Ai click on one of the names, it does a reverse but for the timeline at the exact point

Link to comment
Share on other sites

Don't worry about the language bits... We all struggle and not everyone's a native english speaker.

 

If you want to control all animations together, you might want to look into exportRoot() that will wrap everything into a single timeline that you can control separately.

 

See if that helps you.

  • Like 1
Link to comment
Share on other sites

Yeah, that is a lovely demo but it is also quite complicated one. I often find myself struggling with such demos that are super nice to look at but very hard to see the all the parts that make it move.

 

Right now I can't make a simpler example for you - I should and I shall at some point. But I have been thinking what you are intending to achieve and it occurred to me that what you want is a Carousel. Isn't it?

 

You want several items to be displayed in order and sequentially, moving automatically. Then, you want a control where if you click, it will display the relevant item. That's a Carousel.

 

If you search the forums here, there are several topics discussing it. Do forgive me for not being able to do more than that. I don't have a working carousel to show you. I know it will be hard but 'it is better to learn how to fish than to be given a fish'. 

 

When you find something that fits the bill to what you are after, come ask any questions here. Me and many others will be more than happy to help and explain things in more detail.

 

  • Like 1
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.
×
×
  • Create New...