Question
Trigger animation at marker.
Hi...
I am using this 👇 expression which takes the comment of markers and animates when the CTI hits the marker but I want to use the create a text layer with the marker's comment and when the CTI hits the marker, the same animation happen so I can have more flexibility with the text. How do I go about this?
rate = 22;
m =thisLayer.marker;
txt = "";
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (time < m.key(n).time) n--;
for (i = 1; i <= n-1; i++){
txt += m.key(i).comment + " ";
}
if (n > 0){
curWord = m.key(n).comment;
if (n < m.numKeys){
curRate = Math.max(rate,curWord.length/(m.key(n+1).time - m.key(n).time));
}else{
curRate = rate;
}
t = time - m.key(n).time;
x = curRate*t;
txt += curWord.substr(0,x);
}
}
txtThanks.
