-
Trigger animation at layer endpoint
Hey all,
I have a bunch of video clips in an AE timeline, and I want to trigger an animation every time the active layer changes (basically have the background change position and color). Is this possible? How would I go about it?
My thought is to use a for loop to check for the active layer, and then look to the previous frame, and if the active layer at the current time is different, start the background animation. Something like
for (var i = 4; i <= thisComp.numLayers; i = i + 1) {
var compLayer = thisComp.layer(i)
if (compLayer.active == true) {and then something here saying look at the previous frame, and if different, run the background animation and change the color, but I’m unsure how to write that
There is probably a way easier way to do this (using inPoints maybe?) but I’m not really sure where to go from here or what I should be searching for. Any ideas?