Hm, das habe ich gemacht, aber da kommt der nächste Text nicht mehr...
Hier mal der Code:
Code:
<SCRIPT LANGUAGE="JavaScript">
<!--
var message = "Ticker"
var character = 0;
var to_print = "";
var ypos = 40;
var next = 0 ;
var fade = 100 ;
var next_message = new Array() ;
next_message[0] = "1"
next_message[1] = "2"
next_message[2] = "3"
next_message[3] = "4"
next_message[4] = "5"
function doText(text) {
if (document.all) {
if (character <= text.length - 1) {
to_print += text.charAt(character);
ticker.innerHTML = to_print;
character++;
}
else
scrollIt();
}
setTimeout("doText(message)", 70);
}
function scrollIt() {
if (ypos >= 0) {
ypos -= 1;
fade -= 4;
if (ypos < 5) {
ticker.innerHTML = "" ;
}
}
else {
ypos = 40;
character = 0;
to_print = "";
nextMessage();
fade = 100;
}
ticker.style.top = ypos;
ticker.filters.alpha.opacity = fade;
}
function nextMessage() {
message = next_message[next]
if (next == 4) {
next = 0;
}
else
next++;
}
// -->
</script>
Wo soll jetzt das weitere TimeOut hin?
[edit=alcaeus]Lieber code- als delphi-Tags Mfg, alcaeus[/edit]