ciao ragazzi, vorrei delle piccole informazioni su questo script per realizzare un' effetto random su del testo.
onClipEvent (load) {
_visible = 0;
lettere = " abcdefghilmnopqrstuvxyzABCDEFGHILMNOPQRS
TUVXYZ,.?!";
scritta = "Ciao, come stai?";
lett = lettere.split('');
numlet = lett.length;
scrit = scritta.split('');
numscrit = scrit.length;
intervallo = 1000; //intervallo prima della composizione della frase
posx = 20;
for (i=0; i<numscrit; i++) {
_root.attachMovie("mc_testo", "testo"+i, 10+i);
_root["testo"+i]._x = posx;
_root["testo"+i]._y = 150;
_root["testo"+i].testo = lett[random(numlet)];
posx += _root["testo"+i]._width;
}
timer = getTimer();
j = 0;
}
onClipEvent (enterFrame) {
if (intervallo+timer>getTimer()) {
for (i=j; i<numscrit; i++) {
_root["testo"+i].testo = lett[random(numlet)];
}
} else {
_root["testo"+j].testo = scrit[j];
j++;
timer = getTimer();
intervallo = 50;
}
}
PARTIAMO DA QUESTA PARTE QUì:
_root["testo"+i].testo = lett[random(numlet)];
posx += _root["testo"+i]._width;
Ciao e grazie.
![]()
![]()