ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Want to do a random frame hold

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kevin Camin
Want to do a random frame hold
on Mar 16, 2012 at 3:40:44 pm

How can I do a random frame hold on a precomp?

My end goal is to create a precomp with many still photos one frame each, distributed evenly in time. Then have the expression choose one frame randomly to hold on. Then I'll duplicate this many times to create a large field of postcards.

Anyways I researched some scripts online but none of them are working for me. My comp is 8 frames in length and all the expressions I've tried locks the time at one frame past my last frame. Any help will be appreciated.

Best regards,

Kevin Camin


Return to posts index

Dan Ebberts
Re: Want to do a random frame hold
on Mar 16, 2012 at 4:44:11 pm

Try this:


seedRandom(index,true);
myFrame = Math.floor(random(8));
framesToTime(myFrame)


Dan



Return to posts index

Kevin Camin
Re: Want to do a random frame hold
on Mar 16, 2012 at 5:43:51 pm

Worked like a charm. Thanks so much, Dan!

Best regards,

Kevin Camin


Return to posts index


Jordan Santiago
Re: Want to do a random frame hold
on Jun 26, 2017 at 7:03:15 pm

Five years later and this is till helping people. Well, me at least. Thank you, Dan!


Return to posts index

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