Jump to content
GreenSock

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

set the value of an input via ScrambleText

Recommended Posts

Is there a way to use ScrambleText to animate the value of an <input /> element?

Link to comment
Share on other sites

No, not directly, because input tags do not have any text and ScrambleText isn't designed for tweening attributes.

 

However, you can just scramble the text in a non-visible element and apply to the value attribute of your input using an onUpdate.

 

see: http://codepen.io/GreenSock/pen/XmXepb?editors=101

  • Like 6
Link to comment
Share on other sites

  • 6 months later...

Hi Carl

Thanks for that pen it was very helpful, out of interest I went away a tried to find a method of reversing the animation so that e.g on a button click the value attribute would scramble to nothing, in the same fashion in which it reveals itself here is my pen.

 

See the Pen wGrOjY?editors=101 by w9914420 (@w9914420) on CodePen

 

As you can see it kinda works, but I am not quite happy with the result, I just wonder if you could give some advice, again the effect which I am trying to achieve is a reverse scramble in the same way that it is revealed.

 

regards

 

bromel

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