Jump to content
Search Community

splittext timing issue

ericshew 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

Greetings fellow Greensockers,

 

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

T

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: http://whatcomhope.org/landing-pages/lockbags/

 

Many thanks! 

 

See the Pen ?editors=1111 by ericshew (@ericshew) on CodePen

Link to comment
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

 

See the Pen ooEeqX?editors=1010 by GreenSock (@GreenSock) on CodePen

 

 

  • Like 4
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...