-
How do I avoid a small jump in the first line when using a text animator?
I have a text layer in which the text on the 1st line writes on automatically each time a marker is passed via an expression, the text on the 2nd appears as a single line by moving from below into its final position. That is also controlled by an expression and the animation repeats itself each time a marker is passed.
My problem is that depending on the length of the first line a small jump is noticeable in some of the lines, you can watch an example of this here:
https://www.dropbox.com/s/nhfp7xgfp1y52o4/bumpSample.mp4?dl=0
The 3rd text, at :04 seconds moves slightly upwards.
The problem there is a bunch of small texts in this layer and the issue happens on some of them not all.
So my question is is there something I can add to the expression that will compensate and prevent that slight jump?
Below are the expressions I’m using, I think the problem lies in the offset, which because I only have two lines it stands around 50%
Thanks in advance for your help,
D.For the text source:
txt = value;
n = 0;
if (thisComp.marker.numKeys > 0){n = thisComp.marker.nearestKey(time).index;
if (thisComp.marker.key(n).time > time) n--;
if (n > 0) txt = thisComp.marker.key(n).comment;
}
txt;1st animator, write on the 1st line of text: spd = 65; // characters per second
n = 0;
if (thisComp.marker.numKeys > 0){
n = thisComp.marker.nearestKey(time).index;
if (thisComp.marker.key(n).time > time) n--;
}
if (n > 0){
t = time - thisComp.marker.key(n).time;
dur = text.sourceText.length/spd;
linear(t,0,dur,0,100);
}else
02nd animator, 2nd line moving up:
spd = 65; // characters per second
n = 0;
if (thisComp.marker.numKeys > 0){
n = thisComp.marker.nearestKey(time).index;
if (thisComp.marker.key(n).time > time) n--;
}
if (n > 0){
t = time - thisComp.marker.key(n).time;
dur = text.sourceText.length/spd;
linear(t,0,dur,100,0);
}else
0