ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Random letters change throughout the time

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Anton Shushar
Random letters change throughout the time
on Apr 16, 2019 at 3:55:52 am

I want text's letters change randomly throughout the time, but those letters must be only a, b and h.
So if I type any 6 characters and apply the expression I should have something like so:
ahabba
hbbabh
bhahhb
ahbbha

Also it would be great to be able to change the speed(times/frames) how often letters are randomised.


Return to posts index

Dan Ebberts
Re: Random letters change throughout the time
on Apr 16, 2019 at 5:58:00 am

Something like this maybe:


chars = "abh";
segDur = .5; // change every .5 seconds
seed = Math.floor((time - inPoint)/segDur);
seedRandom(seed,true);
str = "";
for (i = 0; i < value.length; i++){
idx = Math.floor(random(chars.length));
str += chars[idx];
}
str



Dan



Return to posts index

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