Jump to content
GreenSock

JamesGrubb

Update variable using onComplte

Recommended Posts

Hi attempting and failing to get a new random position `pos` every time the timeline completes. Might be over complicating things using a function?

See the Pen PoEWBmj by limitedunlimited (@limitedunlimited) on CodePen

Link to comment
Share on other sites

Hi James,

 

onComplete does not go in the attr object, and you're calling randomPos immediately with the parentheses, but even if that was all correct, it's still not going to update your value like that.

 

What you can do is just put your random string inside and use repeatRefresh.

 

See the Pen ExoZGGv by GreenSock (@GreenSock) on CodePen

 

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