Jump to content
Search Community

Call function when reverse play begins ...

alint test
Moderator Tag

Go to solution Solved by alint,

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

Do you want a callback / event to fire every time you call myTween.reverse()?

 

If so, that functionality is not in the API so you would have to manually invoke the function yourself. 

 

Or do you want to know how to call a function when a repeating / yoyo-ing TweenMax repeats (starts playing backwards on its own)?

 

In that case onRepeat would work.

 

There is another more challenging use case though where a user might want to know when a nested tween in a timeline appears to be playing in reverse because its parent is reversed.

 

If you can share some sample code (preferably in a CodePen) or offer more details to exactly what you are trying to do we can better assist you. Right now there are a few ways to interpret your question, which is no fault of your own.

Link to comment
Share on other sites

  • Solution

The animation that I am talking about is performed when people scroll the page (using ScrollScene class from ScrollMagic). I think my issue is related to ScrollScene, not to TweenMax.

 

Thank you.

 

Alin

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