Jump to content
GreenSock

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

TextPlugin - 'Backspace' when going from more characters to fewer?

Go to solution Solved by PointC,

Recommended Posts

Hi all, 

 

I'm sure there's a super simple answer to this question, but haven't been able to find it. I'm trying to use TextPlugin to erase one bit of text, then replace it with another. My problem is on the first tween, when I'm going from some text to an empty string, it's removing the characters from first to last. How do I reverse this so it looks like someone is backspacing? (In my example, removing the 'd' at the end of 'erased' first)

 

Thanks!

See the Pen zYzNbKz by kslaton (@kslaton) on CodePen

Link to comment
Share on other sites

I don't think there is a right-to-left option with the TextPlugin. ScrambleText has a right-to-left Boolean, but AFAIK there is no way to do that with the TextPlugin. You'd want to use SplitText.

Happy tweening.

:)

 

  • Like 1
Link to comment
Share on other sites

@PointC can you get me started on the right track to accomplishing this using SplitText? 

Link to comment
Share on other sites

  • Solution

On second thought I guess you could reverse the first tween and make this happen. Maybe something like this:

See the Pen 7658a5f21db59cb183374e8fbd04e474 by PointC (@PointC) on CodePen

 

If you want to go the SplitText route, we do have several 'typewriter' themed threads. Here are a couple.

Hopefully that helps. Happy tweening.

:)

 

  • Like 4
Link to comment
Share on other sites

@PointC your reverse tween idea works like a charm. Thanks!

  • Like 1
Link to comment
Share on other sites

Happy to help. Thanks for being Club member. We really appreciate the support. Happy tweening.

:)

 

  • Like 1
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.
×