splittext timing issue

Recommended Posts

Greetings fellow Greensockers,


I've been banging my head against this one for a while now. Greensock has been challenging for me! 


The problem is that I am using splittext to go throw a series of messages and then I want to highlight a key section out of each one.  I am using next / previous buttons to cycle through the various messages. The problem is that if a button is pressed when the cycle is in mid cycle, the results are erratic and janky. I notice that the revert command takes up quite a bit of time.  If you rapidfire the button presses you can see how eratic the outcome is.


I have tried to use the Isactive command to turn off the timeline if it is midsequence but I have not made it work.


I would like help with two things:

1) disabling the previous / next buttons from having an imapct while the timeline is active (bigger priority)

2) put the highlight activation message into the main timeline (instead of calling it in the function that is called when the timeline is over)


Here is the same problem in the project I am working on:


Many thanks! 


Share this post

Link to post
Share on other sites

Thanks for the demo.


You couldn't test isActive() on the timeline most likely because you were declaring the tl var inside a function. By moving the timeline declaration outside the function it will work. In the demo below, I ignore clicks while the animation is happening.


I don't think it's necessary to revert the text in order to apply the active class. In the demo below the highlight animation is part of the timeline




  • Like 4

Share this post

Link to post
Share on other sites

Thank you, Carl. This is tremendously helpful. 

  • Like 1

Share this post

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.