Copy link to clipboard
Copied
I have a box (shape layer) that I want to change the opacity to a random number between 0-100, then hold that opacity value for 2 seconds, then change the opacity value again to another random value, and so on...
Any ideas where I could find a quick copy/paste expression? Thank you.
I'd do it like this:
holdTime = 2;
seed = Math.floor((time - inPoint)/holdTime);
seedRandom(seed,true);
random(100);
Copy link to clipboard
Copied
seedRandom(Math.floor(time/2);
random(0,100);
Mylenium
Copy link to clipboard
Copied
Thank you, however, I am still seeing a new random opacity every frame. I also added another parentheses after (time/2));
Any other ideas?
Copy link to clipboard
Copied
Yeah, my bad. Damn auto-correct when typing on the tablet. 😉
Mylenium
Copy link to clipboard
Copied
I'd do it like this:
holdTime = 2;
seed = Math.floor((time - inPoint)/holdTime);
seedRandom(seed,true);
random(100);
Copy link to clipboard
Copied
That's it! Thank you!