ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Text: make "start" value change over "text length" frames

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alekos Mazzolotti
Text: make "start" value change over "text length" frames
on Jun 10, 2020 at 10:00:39 pm
Last Edited By Alekos Mazzolotti on Jun 10, 2020 at 10:11:46 pm

I use a lot the "typewriter" effect in AE and, as a personal standard, when setting the distance between the 2 keyframes that make the "start" property go from 0% to 100%, I simply count the characters in the word and apply this quantity manually, in frames, so that the letters appear 1/frame.



I was wondering... Is there a way to use an expression to make this property go from 0% to 100% across a number os frames equal to the text length?


Return to posts index

Dan Ebberts
Re: Text: make "start" value change over "text length" frames
on Jun 11, 2020 at 12:28:57 am

Assuming you leave Units set to Percentage, something like this should work:

n = text.sourceText.value.length;
t = time - inPoint;
(t/framesToTime(n))*100


Dan



Return to posts index

Alekos Mazzolotti
Re: Text: make "start" value change over "text length" frames
on Jun 11, 2020 at 2:12:14 pm

Beautiful! Works as clock!!

Just out of curiosity, what if I were to apply the same concept to the "offset" property, in ramp up mode, that, instead of going from 0 to 100, must be set to variate from -100 to +100?

Thanks a huge lot for your help!


Return to posts index


Ranveer Singh
Re: Text: make "start" value change over "text length" frames
on Jun 12, 2020 at 8:29:58 am

Add this expression to the offset property.
Remove the keyframes from start. Set it to 0

I used this expression in After Effects 2020.

txt=text.sourceText;
t=inPoint;
linear(time,t,t+framesToTime(txt.length),-100,100);


Return to posts index

Alekos Mazzolotti
Re: Text: make "start" value change over "text length" frames
on Jun 12, 2020 at 3:34:21 pm

Wonderful!

One last question: how do I like your answer a thousand times? ahahahah

Thanks a huge lot, friend.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]