Jump to content
Search Community

Passing parameters on eventCallback "onUpdate" function

Fox_Danger 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 guys, I'm trying some things here, and I got this:
 

tempTimeline.eventCallback( "onUpdate" , updateTimelineTween );

But my timeline is not a global var, just exist on a function. I put the "updateTimelineTween" function to receive one timeline as parameter.

 

Now how can I pass the tempTimeline as parameter? I try use this but obvious didn't work because it execute the method...

tempTimeline.eventCallback( "onUpdate" , updateTimelineTween(tempTimeline) );

Any idea about how to do it?

Tnx a lot guys!

EDIT: Sorry guys, I found it:
 

tempTimeline.eventCallback( "onUpdate" , updateTimelineTween , [params] );

Someone please can delete the topic (or not if its fine to help another one with the same doubt) :D

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