PDA

View Full Version : Typing scroller - need two lines



Paul Keely
04-02-2007, 11:28 AM
1) Script Title: Typing scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/typescroll.htm

3) Describe problem: Hi there. I was wondering if it was possible to put two typing scrollers, one underneath the other, on a page. Either that, or to let one scroller have two lines of text that appear at the same time. I don't want one line that alternates - I'd like two lines to appear at the same time.

I've tried copy and pasting the same code twice on a page, but that just makes them both not work. What do I do?

Thanks.

jscheuer1
04-02-2007, 04:00 PM
http://www.dynamicdrive.com/dynamicindex10/text5.htm

After downloading the script and saving it in your HTML page folder, try this out:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="TypingText.js">
/****************************************************
* Typing Text script- By Twey @ Dynamic Drive Forums
* Visit Dynamic Drive for this script and more: http://www.dynamicdrive.com
* This notice MUST stay intact for legal use
****************************************************/
</script>
</head>
<body>
<p id="example">This text has a <b>slashing cursor</b> at the end. <br />And this is on a new line, thanks to the &lt;br&gt; tag.</p>

<script type="text/javascript">

//Define typing example (use "slashing" cursor at the end):
var bob=new TypingText(document.getElementById("example"), 100, function(i){ var ar = new Array("\\", "|", "/", "-"); return " " + ar[i.length &#37; ar.length]; });

bob.run();
bob.finishedCallback=function(){setTimeout("bob.run()",1000);};

</script>
</body>
</html>