I'm trying to do trigger a keyframe for a timeremap using an expression as follows, but after I put in the expression the output goes black:
- Did a timeremap on the precomp.
- Put in two keyframes. One where I need the comp to start, second where it ends.
- Then I used the following expression:
clockStart = parseInt(comp("main").layer(5).text.sourceText.value);
t = linear(time,0,clockStart+1,0,key(1).value+time);
valueAtTime(t);
clockStart here is basically where I want the composition to trigger In. So my first keyframe.value is 14, Second keyframe.value is 20. If my clockStart is 10. At the start of the play the value of the timeRemap for this layer/comp is set to 14 (first keyframe value). Then when it plays, and clockStart reaches 10 then the timeremap start's counting in from 14 onwards until the second key frame (value is 20). This seems to work as I want but the issue is the output goes black I don't have any output while the expression is enabled on the time Remap. I tried looking for other properties like opacity but all are set properly and opacity is 100per. THe moment I remove the expression I have output on it. What can be wrong with this expression ?