Copy link to clipboard
Copied
I recently discovered this youtube tutorial (https://www.youtube.com/watch?v=FRaZaGFPW4o) showing how to use an After Effects CC expression to animate type on text. For example:
toShow = "John Smith \rHuman Resources"
text.sourceText = toShow.substring(0,time*20)
What does "(0, time*20)" refer to? The expression is great, but when I move the typing text layer forward in time, the animation cuts off. I need the expression to be more flexible. How can I change this expression so that I can move the typing text layer anywhere I want on the timeline and not have the typing text get cut off? And is there a way to alter the expression so that I can pause the animation for 1 or 2 seconds before the second line types out? Thank you in advance for any help. I reached out to the person who posted that video but haven't heard back from him, so I thought I'd ask here.
Copy link to clipboard
Copied
Try it this way:
toShow = "John Smith \rHuman Resources"
toShow.substring(0,(time-inPoint)*20)
Dan
Copy link to clipboard
Copied
Thanks Dan. I'll try that as well.
Copy link to clipboard
Copied
First, that tutorial is a really lousy one by an enthusiast that gets one thing to work with a really restrictive workflow. The typewriter animation preset does everything that his expression does but it is easier to use, can be easily set to any time, does not depend on the layer in point, can be used with Essential Graphis to create a MOGRT and just plain works.
The presenter over complicates the expression so you are required to edit the text in the expression. All you need is:
substring(0,time*20)
If you want the animation to start at the layer in-point you need to subtract the inPoint from time like this:
t = time - thisLayer.inPoint;
substring(0, t*20)
To really make it useful you need to add a slider that you can use for speed control, then save it as an animation preset. The expression would look like this:
t = time - thisLayer.inPoint;
spd = effect("Slider Control")("Slider");
substring(0, t*spd)
But that is more work by far and no more useful than using the typewriter text animator that comes with After Effects.
You have got to vet your trainers. There is a lot more bad advice and poor workflows on YouTube than there is good because it is so easy for the untrained to do a screen recording and pitch their "magic" solution to a specific problem.
Copy link to clipboard
Copied
Thank you very much for all your help Rick. You've given me a lot to expiment with. I agree with you about that tutorial, not recommended.
Glad i could get far more useful info right here. Thanks again! 🙂
Find more inspiration, events, and resources on the new Adobe Community
Explore Now