Jump to content
GreenSock

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

TimelineMax.addLabel() listener?

Recommended Posts

Hi

 

Is there a way to to add a listener when the timelinemax instance reaches a label or would I have to use TimelineMax.currentLabel on the onUpdate to see the label change?

 

Thanks!

Link to comment
Share on other sites

Absolutely - just use addCallback() to put a callback at that label.

 

yourTimeline.addCallback(yourFunction, "yourLabel");

 

http://api.greensock.com/as/com/greensock/TimelineMax.html#addCallback()

 

If you really need an event listener, you could insert a zero-duration TweenMax there that has a TweenEvent.COMPLETE listener added to it.

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