FORUMS: list search recent posts

Control Play, Pause, Resume a footage based on a slider using time remap (or else?)

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Eric Benacek
Control Play, Pause, Resume a footage based on a slider using time remap (or else?)
on Nov 24, 2016 at 3:47:38 pm

Hello,

is there a way to control a video playback/resume thru an expression?

here's the context :

I have a comp playing a video,
a slider to control it's Y position,
at 50 it's in the center, at 0 and 100 it's out of view.

What I would like to do is to pause/freeze the video,
when it's between 0 and 20, and 80,100.
and plays/resume when it's between 20 and 80.


Thank you for your time!


Return to posts index

Dan Ebberts
Re: Control Play, Pause, Resume a footage based on a slider using time remap (or else?)
on Nov 25, 2016 at 7:38:03 pm

Something like this maybe:


s = effect("Slider Control")("Slider");
f = timeToFrames(time);
n = 0;
for (i = 0 ; i < f; i++){
v = s.valueAtTime(framesToTime(i));
if (v > 20 && v < 80) n++;
}
framesToTime(n)



Dan



Return to posts index

Eric Benacek
Re: Control Play, Pause, Resume a footage based on a slider using time remap (or else?)
on Dec 5, 2016 at 2:22:59 pm

Thank you so much!!!!
I'm still trying to understand the voodoo behind it but it works!


Return to posts index

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