In short, I want an algorithm similar to the subtitle transition but no audio or video, just a text transition with delay and fade .
Scenery:
I have a array with 20 arrays , each array consists of 2 values: the first containing the string of the caption and the second containing the delay in milliseconds .
ps : The reason for this structure is to facilitate maintenance through JSON.
Example:
var arrLegendas = [
["legenda 1, blablalba", 2000],
["legenda 2, blablalbaaldaldald", 4000],
["legenda 3, bla", 1000],
["legenda 4, blablalbaasdasd", 3000],
]
I tried this and almost succeeded . It works perfectly if you remove the fades (only the transition of the texts 'solid'). With the fades, after the tenth transition (approximately), the texts begin to be placed after the fade do not know why.