Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Text typewriting in, but Staying Centered

  • Text typewriting in, but Staying Centered

  • Adam Stockholm

    October 18, 2011 at 5:40 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

  • Dan Ebberts

    October 18, 2011 at 8:12 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

  • Adam Stockholm

    October 18, 2011 at 9:17 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!

  • Dan Ebberts

    October 19, 2011 at 12: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

  • Adam Stockholm

    October 19, 2011 at 1:28 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?

  • Gerald Mark Soto

    April 21, 2018 at 7:46 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

  • Juan Rozo

    March 24, 2020 at 4:31 pm

    I just opened an account at CreativeCow to tell you that I appreciate your help. It worked perfectly.

Viewing 1 - 7 of 7 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy