ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Text typewriting in, but Staying Centered

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam Stockholm
Text typewriting in, but Staying Centered
on Oct 18, 2011 at 5:40:41 pm

Hi!

This is for a tool kit, hence why it needs to be updatable and automated

I would like to have the typewriter effect bring the letters on, but as the letters appear the text stays in the center of the screen.

So if the word was "Football", the "F" starts in the center, when the o appears the "F" shifts over to the left and the "o".. is now in the center..and so on.

Thanks!!

Adam


Return to posts index

Dan Ebberts
Re: Text typewriting in, but Staying Centered
on Oct 18, 2011 at 8:12:48 pm

Instead of using the typewriter preset, you could set your text layer to right justification and use a Source Text expression like this:

charPerSec = 4;
idx = Math.floor(time*charPerSec);
value.substr(0,idx)

This will bring the characters in at 4 characters per second and each will appear just to the left of the anchor point as the others move to the left.

Dan



Return to posts index

Adam Stockholm
Re: Text typewriting in, but Staying Centered
on Oct 18, 2011 at 9:17:12 pm

Thanks a lot Dan!

That's really close, I actually changed the type to centered and it did exactly what I needed it to.

There is one problem. It will not read kerning. Just manual kerning. With this being a toolkit, they will definitely be individually kerning. Any ideas?

Thanks!


Return to posts index


Dan Ebberts
Re: Text typewriting in, but Staying Centered
on Oct 19, 2011 at 12:03:03 am

Ugh. If you go back to the typewriter preset and add this Position expression to the text layer, it might get you close to what you're after. Ugly though.


for (i = thisComp.width; i >= 0; i--){
temp = sampleImage([i,thisComp.height/2],[0.5,thisComp.height/2],true,time);
if (temp[3] > 0) break;
}
value - [i-value[0],0]



Dan



Return to posts index

Adam Stockholm
Re: Text typewriting in, but Staying Centered
on Oct 19, 2011 at 1:28:52 pm

Yeah, I know you don't like using sampleImage because it's a hack, but I appreciate it.

I think that this could work. The type appears in the middle and the existing letters move to the left. Is there a way to tell the the text to always stay centered in the comp window. As the letters appear it realigns the position to the center?


Return to posts index

Gerald Mark Soto
Re: Text typewriting in, but Staying Centered
on Apr 21, 2018 at 7:46:54 pm

Hey Dan, I just posted an expression question yesterday, but i actually think this might be close to what i need. Is there anyway to make that expression work on entire words rather then just per character and to add the fade up from 0-100% as it slides out.

this is the link to the question i asked yesterday:
https://forums.creativecow.net/thread/227/38533


Return to posts index

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