Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
mrkos67

adding an event callback after instantiation

Recommended Posts

I've created an instance of a TimelineMax, and now I want to add an onUpdate callback after it's been created. The only thing I can find to set up event callbacks show it is during the instantiation. Is there a way to do this?

Link to post
Share on other sites

So I just found that after I posted, but it doesn't work as intended. I add an "onUpdate", but it only fires when the timeline's play function is called. 

Link to post
Share on other sites

pls check this out : 

See the Pen qZEgpm by MAW (@MAW) on CodePen

 

every thing works correctly , pls fork if still have any problem 

Link to post
Share on other sites

Okay, I figured it out. My timeline didn't actually have a duration. I thought by setting a label at a specific time in the timeline, it would give that timeline a duration. So I had to put in an empty function to actually give it a duration. All is good. Thanks for your help!

Link to post
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.

×