Trigger Composition Closure using a Counter

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
User avatar
Posts: 2
Joined: February 10th, 2019, 10:06 am

I'm trying to trigger a composition closure using a TimeRemap on the composition with 4 key frames, with the script as follows:

clockStart = parseInt(comp("main").layer(5).text.sourceText.value);
clockTime = clockStart-1*(time);

sIn = key(2).time - key(1).time;
sOut = key(4).time - key(3).time;

if (time < clockStart)
else if (time >clockStart)

So basically I want to trigger the key3, if the time is greater the clockStart (which is timer for the value in clockStart) and will go to 0 when time passes clockStart.
In the above case it does a trigger but the issue I'm having is I need to readjust key4 keyframe.time manually everytime I change the clockStart value otherwise it give's me a cut instead of a smooth fadeout.

E.g. if the clockStart is 14, the value for keyframe 4 works fine at 28
if the clockStart is 10, I need to adjust the keyframe 4 to 24 so I get a smooth fadeout.

Any ideas.
Post Reply