-
Using Slider Control to change keyframes, and then looping those keyframes
Hello,
I’m relatively new to AE and have hit a stumbling block.
I am trying to set up a template – the purpose is to be able to drop in images and text in a kind of carousel that could be repurposed and changed depending on circumstances. The various images and text scale up or down over time, all at the same rate, and I want to be able to control the degree of this scaling using sliders.
In order to do this with the text, for example, I have set up a null linked to the scale parameter of all text layers. I want to ensure that each of these text layers grows or shrinks at the same rate. I have used the expression below to allow slider control of the first two keyframes.
My problem is that I don’t know how to then loop these keyframes. If I add loopOut() to the end of this expression, the slider values are ignored, and the keyframes loop as if this code didn’t exist.
Is there a way to alter the value of keyframes using sliders, and then loop these keyframes?
Thanks for your help in advance,
David
if (numKeys > 1){
t1 = key(1).time;
t2 = key(2).time;
sliderStart = effect("Scale Control Start")("Slider");
v1 = [sliderStart, sliderStart];
sliderEnd = effect("Scale Control End")("Slider")
v2 = [sliderEnd, sliderEnd];
linear(time, t1, t2, v1, v2);
} else {
value
}