Jump to content
Search Community

onUpdateParams isn't giving me access to {self}

Elicrespo test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hey guys,

 

I am trying to use and learn about onUpdateParams. The targetSelector is passing but the "{self}" isn't passing and I can't access the tween. What monstrosity am I committing here?  LOL

 

Yes, the commented code works, but I am focused on "onUpdateParams". 

 

Thank you. Appreciate the help.

See the Pen dyLbzvP by elicrespo (@elicrespo) on CodePen

Link to comment
Share on other sites

  • Solution

That's the very old syntax - honestly, the Params stuff is not necessary at all. Your intuition was correct - just do this:

onUpdate() {
    syncOpacity(this, ".box2");
}

See the Pen poBzVxO?editors=1010 by GreenSock (@GreenSock) on CodePen

 

There's no practical reason why you'd need to use params - that's more of a relic from the past that'll likely get dropped in a future major release (not anytime soon). 

 

Does that help?

Link to comment
Share on other sites

12 hours ago, GreenSock said:

That's the very old syntax - honestly, the Params stuff is not necessary at all. Your intuition was correct - just do this:

onUpdate() {
    syncOpacity(this, ".box2");
}

 

 

 

There's no practical reason why you'd need to use params - that's more of a relic from the past that'll likely get dropped in a future major release (not anytime soon). 

 

Does that help?

Yes, it helps. Thank you so much Jack. @GreenSock 

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