-
Change the width only in the horizontal direction by slider
Hello guys,
could you help me please with one expression which i can’t figure out?
I have an animated bar with text in another layer and I would like to change the width of the bar only in the horizontal direction by slider and only between keyframes 3 and 4 (the static part of the animation). For now, the first part of expression works great, but the second part doesn`t, width remains the same until the end of the animation. I’m a newbie in Java, so can you someone help me?Thank you in advance
Arti
if (numKeys >=6 ) {
t1 = key(2).time;
t2 = key(3).time;
slider = thisComp.layer("Controls").effect("Scale width")("Slider");
v1 = [value[0], value[1]];
v2 = [slider, value[1]];
easeOut(time, t1, t2, v1, v2);
} else if (numKeys >=6){
t4 = key(4).time;
t5 = key(5).time;
slider = thisComp.layer("Controls").effect("Scale width")("Slider");
easeIn(time, t4, t5, v1, v2)
}