questo codice dovrebbe far quel che chiedi... sinceramente non l'ho provato... chi l'ha postato in un thread di un altro forum ha detto che l'ha trovato sul forum dei 247media e funziona bene
codice:
TextField.prototype.setText = function(str) {
this.text = "";
this.destinationText = str;
this.count = 0;
this.numLoops = 1;
if (this.timer) {
clearInterval(this.timer);
}
this.timer = setInterval(this, "writeString", 50);
updateAfterEvent();
};
TextField.prototype.getLetter = function() {
var a = "234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";
return (a.charAt(Math.floor(Math.random()*a.length-1)));
};
TextField.prototype.writeString = function() {
if (this.destinationText.length*this.numLoops>=this.count) {
var c = "";
var b = 0;
while (b<this.destinationText.length) {
if (this.destinationText.charAt(B) != " ") {
if (Math.floor(this.count/this.numLoops)>b) {
c = c+this.destinationText.charAt(B);
} else {
c = c+this.getLetter();
}
} else {
c = c+" ";
}
b++;
}
this.text = c;
this.count++;
} else {
this.text = this.destinationText;
clearInterval(this.timer);
}
updateAfterEvent();
};
// yourInstanceName.protoType("put your kickass text here!");
sezione1.setText("Azienda");