Forum Moderators: open

Message Too Old, No Replies

Animated Text?

         

erikcw

8:14 pm on Jan 30, 2007 (gmt 0)

10+ Year Member



Hi all,

I'm trying to animate some text. Basically while a page is loading, I have a floating layer asking the user to be patient while their task is being completed.

I'd like to have something like:

Working... (have the dots flashing on in order)

Working.[wait].[wait].[wait]. {disappear and repeat}

How can I tackle this?

Thanks!

maccas

8:18 pm on Jan 30, 2007 (gmt 0)

10+ Year Member



a animated gif.

cmarshall

9:11 pm on Jan 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is from the famous "Marvin" Error 404 Page:

var tl=new Array(
"The requested document is totally not here! ",
"Nothing but 404 here. ",
"Even tried multi times. ",
"Nothing helped. ");

// etc.

function type_text()
{
contents='';
row=Math.max(0,index-9); // This prevents scrolling issues by cutting off the upper text.

while(row<index)
{
contents += tl[row++];
contents = contents.concat ( '\n' );
}
document.getElementById('depressed').bemoan.value = contents + tl[index].substring(0,text_pos) + "_";
if(text_pos++==str_length)
{
text_pos=0;
index++;
if(index!=tl.length)
{
str_length=tl[index].length;
setTimeout("type_text()",1000);
}
else
window.setTimeout("window.location.replace('index.htm')", 5000);

} else
setTimeout("type_text()",speed);
}
type_text();

in which "depressed" is a textarea.