I have a text layer, and the source text has an expression so it reads the comments inside the markers on the text layer.
I’m wondering if there was a way to modify the expression so you can have the text from the previous marker still display after the play head hits the next marker. Just like you were animating a sentence with the text animator.
The text marker expression is applied to the source text.
The range selector is still on the text layer but the expression is added to the expression selector.
Thanks in advance!
/* This is applied to source text*/
txt = value;
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time) n--;
if (n > 0) txt = marker.key(n).comment;
}
txt
/* This is applied to the scale expression selector*/
m = marker;
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;
}
if (n > 0){
t = time - m.key(n).time;
startVal = 100;
endVal = 0;
dur =.3;
if (t < dur){
s = linear(t,0,dur,startVal,endVal)
}else{
amp = (endVal - startVal)/dur;
freq = 3;
decay = 5;
w = freq*Math.PI*2;
s = endVal + amp*Math.sin((t-dur)*w)/Math.exp(decay*(t-dur))/w
}
[s,s]
}else
value