oggi mi sento buono...
tempo fa ho fatto questo tipo di script e può essere configurabile a tuo piacere
codice:
<script language="JavaScript">
<!--
//***************************************************************//
// Mackey Statusbar 1.0 //
// realizzato da Matteo "mackey" Chessa //
// www.mackey.too.it //
// Copiright © 2002 //
//***************************************************************//
//**********************VARIABILI EDITABILI**********************//
var messaggio = "<< questo è un testo di prova e non può essere + lungo di 126 caratteri >>";
// non più di 126 caratteri
var velocità = 1;
// velocità massima consentita: 63
var senso = 1;
// 1 da destra a sinistra
// 2 da sinistra a destra
var modalità = 1;
// 1 scorrimento
// 2 macchina da scrivere
var locazione = 3;
// 1 Barra di Stato
// 2 Barra del Titolo
// 3 Barra di Stato e del Titolo insieme
//***************************************************************//
if(messaggio.length>126)
alert("Attenzione! Il messaggio non può essere più lungo di 126 caratteri");
else if(velocità>63 || velocità<0)
alert("Attenzione! La velocità minima è 0, massima è 63");
else window.onload = scrollMe;
if(modalità!=1) senso=1;
if(senso==2) velocità = 127 - velocità;
var spc = " ";
if(locazione > 1) spc = "-";
var largh = 127-messaggio.length;
var spaz = spc;
for(var i=1;i<largh;i++) {
spaz += spc;
}
var msg = messaggio+spaz;
var msg2 = msg;
var mod2 = 1;
function scrollMe() {
if(modalità==1)
msg = msg.substring(velocità, msg.length) + msg.substring(0,velocità);
else if(modalità==2) {
if(mod2>msg2.length) mod2=1;
msg = msg2.substring(0, mod2);
mod2 += velocità;
}
if(locazione==1) window.status = msg;
else if(locazione==2) document.title = msg;
else if(locazione==3) { window.status = msg; document.title = msg; }
timer = setTimeout("scrollMe()", 150);
}
//*************************FINE SCRIPT***************************//
//-->
</script>