Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Use Wiggle to blink characters in a line of text

  • Use Wiggle to blink characters in a line of text

  • Mary Delaney

    May 21, 2020 at 9:03 am

    Hi, I hope this question hasn’t already been answered before –

    I have a long line of text in which I’d like each character to switch between 0 and 1. It’s a line of 10101010101 going across the screen, and I’d like to find a way for each number to randomly switch between 0 and 1.

    Is there a way to do this without putting each number on a separate layer? I had hoped I could somehow use the Type Array plug-in combined with a Wiggle expression, but I’m not sure if it’s even possible – I’m stumped. I’m pretty new to Aftereffects so stuff like this still trips me up. Any guidance is so appreciated!

  • Andrei Popa

    May 21, 2020 at 3:54 pm

    Make a text layer. Add this expression to the text property;


    var numChars = 20;
    var solution = '';
    for(var i=0; i< numChars; i++){
    solution+=Math.round(random())
    }
    solution

    Andrei
    My Envato portfolio.

  • Mary Delaney

    May 21, 2020 at 6:40 pm

    Cheers, Envato! That worked! Is it possible to vary the rate at which the characters switch between 1 and 0? It’s super fast…

  • Andrei Popa

    May 22, 2020 at 6:40 am

    posterizeTime(2)
    var numChars = 20;
    var solution = '';
    for(var i=0; i< numChars; i++){
    solution+=Math.round(random())
    }

    solution

    The argument of the posterizeTime is how many times a second you want it to change.

    Andrei
    My Envato portfolio.

  • Mary Delaney

    May 22, 2020 at 8:17 am

    That did the trick. Thank you so much!

Viewing 1 - 5 of 5 posts

Log in to reply.

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