Jump to content
Search Community

Tween Override?

soupking 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

Hi Everybody,

 

Is there a command of some kind that I can assign a tween to an element and it just trumps all other tweens?

 

Like my scenario is I have a media unit where it loops with a button. The first time around the button doesn't show up until the end of the sequence. But every other loop it stays there the whole time no matter what it's told to do down the timeline.

 

Is there a command of attribute in the API that does that?

 

 

Link to comment
Share on other sites

47 minutes ago, Shaun Gorneau said:

If by trumping you mean "undoing all property changes done by other tweens", you're looking for `clearProps: "all"`.

 

Hey guys, thanks for the response. Y'all are great as always. You know, I figured out something where I made a duplicate of the button I wanted to sustain after the first loop.  That seemed to do the trick.

 

I'm not quite sure how one would use a conditional override in Timeline other than overwrite:true, but thought I'd ask.

 

Thanks anyway!

 

 

 

Link to comment
Share on other sites

From my loose understanding of the question I thought you could call a function at the end of the timeline that would trigger an individual tween outside the timeline that would reveal the button. once it's revealed, nothing in the timeline would affect it. But as mentioned before, even the simplest of demos goes a long way in helping us understand what you need. glad you found a solution.

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