Share Posted August 8, 2016 Hi I am trying to change a text value in an animation using a timeline, for example, i'd like the text to animate off, the value to update, and then animate on again. I need to know that the animate on doesn't start until the text value has changed. I hoped to be able to use the timline.set(textfield, {text:"NewValue"}); but it seems that set/tween can only use numeric values? How can I best achieve this result? Link to comment Share on other sites More sharing options...
Share Posted August 8, 2016 You should be able to do that - you just need to load the TextPlugin. http://greensock.com/docs/#/HTML5/GSAP/Plugins/TextPlugin/ If you're still having trouble, please provide a reduced test case in a codepen (or jsfiddle) and we'd be happy to take a peek. Happy tweening! Link to comment Share on other sites More sharing options...
Author Share Posted August 8, 2016 Thanks. I'm using actionscript and that plugin doesn't seem to exist here, is there an alternative? Link to comment Share on other sites More sharing options...
Share Posted August 8, 2016 Oh, sorry! Almost all the questions these days are HTML5/JS-focused. I missed that you posted in the Flash forum. You could probably just use a simple function that you drop into your timeline. Kinda like: timeline.call( function() { textField.text = "whatever"; }); That'd only work one-way, though (not in reverse). You could use ScrambleTextPlugin as a hack - since you're not really animating anything, a zero-duration scrambleText tween would essentially have the same effect as just immediately setting the text to that end value. Just an idea. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now