This may be what you want, but I'm not quite sure:
p = thisLayer.effect("Checkbox Control")("Checkbox");
t = 0;
if (p.numKeys > 0){
n = p.nearestKey(time).index;
if (p.key(n).time > time) n--;
if (n > 0){
for (i = 1; i <= n; i++){
if (p.key(i).value == true){
if (i < n){
t += p.key(i+1).time - p.key(i).time;
}else{
t1 = p.key(n).time;
if (n < p.numKeys){
t2 = p.key(n+1).time;
t += ease(time,t1,t2,0,t2-t1);
}else{
t2 = thisComp.duration;
t += easeIn(time,t1,t2,0,t2-t1);
}
}
}
}
}
}
amp = 10;
freq = 1;
y = amp*Math.sin(t*freq*Math.PI*2);
value + [0,y]
... View more