Show subtitles.
See http://www.youtube.com/watch?v=4LAnZPDUOiI for details.
L = thisComp.layer("the layer");
max = 5; // number of words to display
n = 0
if (L.marker.numKeys > 0){
n = L.marker.nearestKey(time).index;
if (L.marker.key(n).time > time){
n--;
}
}
s = " ";
if (n > 0){
base = Math.floor((n-1)/max)*max + 1;
for (i = base; i < base + max; i++){
if (i <= L.marker.numKeys){
s += L.marker.key(i).comment + " ";
}
}
}
s