In the simplest form, it could look something like this (you’ll have to edit it to point to the actual location of the checkbox). Hopefully it will work for you, or at least give you some ideas:
cb = effect("Checkbox Control")("Checkbox");
fadeFrames = 20;
cbOn = -50;
cbOff = -12;
fadeTime = framesToTime(fadeFrames);
v = cb.value ? cbOff : cbOn;;
if (cb.numKeys > 0){
n = cb.nearestKey(time).index;
if (time < cb.key(n).time) n--;
if (n > 0){
t = time - cb.key(n).time;
if (cb.key(n).value){
v = linear(t,0,fadeTime,cbOff, cbOn);
}else{
v = linear(t,0,fadeTime,cbOn, cbOff);
}
}
}
[v,v]