ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Use Wiggle to blink characters in a line of text

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mary Delaney
Use Wiggle to blink characters in a line of text
on May 21, 2020 at 9:03:01 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!


Return to posts index

Andrei Popa
Re: Use Wiggle to blink characters in a line of text
on May 21, 2020 at 3:54:16 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.


Return to posts index

Mary Delaney
Re: Use Wiggle to blink characters in a line of text
on May 21, 2020 at 6:40:34 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...


Return to posts index


Andrei Popa
Re: Use Wiggle to blink characters in a line of text
on May 22, 2020 at 6:40:56 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.


Return to posts index

Mary Delaney
Re: Use Wiggle to blink characters in a line of text
on May 22, 2020 at 8:17:49 am

That did the trick. Thank you so much!


Return to posts index

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