Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how can I alter this After Effects CC typing text expression to make time changes???

Enthusiast ,
Dec 13, 2019 Dec 13, 2019

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. 

Screen Shot 2019-12-13 at 10.59.29 AM.png

 

 

UPDATE 2020: Apparently there's a Typewriter effect built-in to After Effects. I didn't know it existed at the time I made this video. I'd recommend using that instead you have a lot more control with keyframes. (just search "Typewriter" in the Effects & Presets window.) I've found there is no ...
TOPICS
Expressions
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2019 Dec 13, 2019

Try it this way:

 

toShow = "John Smith \rHuman Resources"
toShow.substring(0,(time-inPoint)*20)

 

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 13, 2019 Dec 13, 2019

Thanks Dan. I'll try that as well. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2019 Dec 13, 2019

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 13, 2019 Dec 13, 2019
LATEST

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! 🙂  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines