Thanks a lot for your help, Robert!
I still couldn’t get it to work, but I had another look at older threads and found this one:
https://creativecow.net/forums/thread/trigger-a-animation-using-a-checkbox/
One of Dan’s expressions work perfectly for my case. I have tried it before but must have made a mistake, now I applied it to my comp again and it works as it should. It’s this one here by Dan Ebberts (applied to my comp):
<pre class=””>
n = 0;
p = comp(“2.1a. Creator”).layer(“ICON_CTRL”).effect(“ICON_CTRL”)(“Checkbox”);
if (p.numKeys > 0){
n = p.nearestKey(time).index;
if (p.key(n).time > time) n–;
}
if (n > 0 && p.key(n).value)
time – p.key(n).time
else
0
Having said that, I have another question someone might be able to help me figure out?
In my main comp, I have a few components with videos. As I’m animating a scroll, the videos need to start playing. So In the Precomp I have a still layer and the video layer. I’m using a simple expression like this applied to Opacity:
if (comp("2.1a. Creator").layer("VIDEO_CTRL").effect("VIDEO_3")("Checkbox")== true) {100} else {0}
I’m simply showing the video on top of the still while the checkbox is on. The client however wants me to play sound with the video so I added a Slider Control to Levels and using the same checkbox to control the volume like this:
if (effect("VIDEO_3")("Checkbox")== true) {0} else {-100}
I was wondering if there’s any way to fade in the audio say in 20 or so frames rather than cut to it? So I want to use the same keyframe to start previewing the video as well as fade in its audio.
Thanks!
Trigger a animation using a checkbox