ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Randomize between lowercase and uppercase in a text layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Cecilia Erlich
Randomize between lowercase and uppercase in a text layer
on Nov 2, 2019 at 12:29:56 pm

Hi!

Is it possible to use an expression to randomize between lowercase and uppercase in a text layer?

I really appreciate any help,
thank you so much!


Return to posts index

Dan Ebberts
Re: Randomize between lowercase and uppercase in a text layer
on Nov 2, 2019 at 6:54:20 pm

I'm not sure exactly what you mean, but try this expression for Source Text:


seedRandom(index,true);
txt = value;
s = "";
for (i = 0; i < txt.length; i++){
s += random() < .5 ? txt[i].toUpperCase() : txt[i].toLowerCase()
}
s



Dan



Return to posts index

Cecilia Erlich
Re: Randomize between lowercase and uppercase in a text layer
on Nov 2, 2019 at 7:18:46 pm

Thanks a lot, Dan!!
That´s exactly what I needed.


Return to posts index

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