FORUMS: list search recent posts

Random time playback

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ilya Sire
Random time playback
on Apr 7, 2016 at 6:01:31 pm

Hi forum,

I have a situation like this:
Inside CompA have 10 stagger layers animation (each layer animate for 2 second)

How can i time remap CompA to pick a random segment and play 2 second animation and stop frame (freeze)?

I search on this but no result similar but this and i cant understand much. :(

Thanks forum!

Return to posts index

Kalle Kannisto
Re: Random time playback
on Apr 9, 2016 at 11:03:29 am
Last Edited By Kalle Kannisto on Apr 9, 2016 at 11:12:04 am

Try this.

You'll need to add a slider control in CompA. This is used to randomize the clip, which would otherwise always be the same.

This plays a random one of the clips and then stops.

seqDur = 2;
compDur = Math.floor((outPoint-inPoint)/seqDur)*seqDur;
clips = compDur/seqDur;
seed = effect("Slider Control")("Slider");
clipStart = Math.floor(random(clips))*seqDur;
clipEnd = clipStart+seqDur-thisComp.frameDuration;
linear (time, 0, 2-thisComp.frameDuration, clipStart, clipEnd)

Return to posts index

Ilya Sire
Re: Random time playback
on Apr 9, 2016 at 5:07:34 pm

Sweet! Thank you so much for the solution. It works just fine.

Tq10x :)

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved