SimplytheBest News:

SimplytheBest Shareware - As always, the Simply the Best Shareware and Freeware directory. Check the New Shareware page, the Spotlight page and the Hot Package page.

SimplytheBest Scripts - Find the finest scripts available on the Web in our CGI scripts and DHTML scripts and Javascript libraries.

SimplytheBest More Info - Detailed explanations on many computer related subjects such as spyware, webmaster resources, databases. Also selected links to related resources such as Flash, ASP, PERL, device drivers, and how-to pages such as ColdFusion, Servers, and more...

CLICK HERE TO ENTER!

 
Text scroller script
 

SimplytheBest
Scripts

ASP scripts
PERL scripts
PHP scripts
JavaScripts & Ajax
Snippets
Online scripts

Ajax, DHTML
& JavaScripts

Animation
Background
Bookmarks
Buttons
Calculators
Cookies
Data handling
E-mail
Enhancements
Forms
Image rotation
Menus
Messages
Miscellaneous
Music
Password protection
Redirection
Scrollers
Tables
Time & date
Windows

Publishers
Add script
Account login
Publisher list



 

Home > Scripts > DHTML scripts & JavaScripts > Scrollers > Text scroller script

 

Text scroller script

AUTHOR: Thomas Brattli
TYPE: Freeware
BROWSERS:
IE 4+, IE 5+, IE 6+, NS 4+

An easy to use text scroller script useful for displaying news items or other information in a small area. You can include images and URL links inside the scrolling area.


EXAMPLE

 

 

 

 

 


1)
Insert this style command in the <HEAD> section of the page.

then copy (CTRL-C) & paste (CTRL-V)

2) Insert this script also in the <HEAD> section of the page.

then copy (CTRL-C) & paste (CTRL-V)

3) Insert the following HTML code anywhere in the <BODY> section.

then copy (CTRL-C) & paste (CTRL-V)

4) Define the size of the scrolling area and its positioning on the page in this section of the <STYLE> command:

<style type="text/css">
#divNewsCont{position:absolute; width:350; height:150; overflow:hidden; top:260; left:140; clip:rect(0,350,150,0); visibility:hidden}
#divNewsText{position:absolute; top:0; left:0}
</style>

Note: Remember to set the clip the same as the width and height.

5) Define the speed of the scrolling text, the starting point of the scroller in the layer and other variables in this section of the script:

// The pixel value of where you want the layer to start (from the top)
lstart=200
// Set this to false if you just want it to scroll one time only
loop=true 
// Set the speed, lower value gives more speed
speed=150
// Set this to how many pixels you want it to go for each step, this also changes the speed
pr_step=5

6) Define the content of the scrolling area in this section of the HTML code:

<div id="divNewsCont">
<div id="divNewsText">
<p><font face="Arial" size="3"><b>SimplytheBest News:</b></font><br><br>
<font><b>SimplytheBest Shareware</b> - As always, the Simply the Best Shareware and Freeware directory. Check the New Shareware page, the Spotlight page and the Hot Package page.
<br></font></p>
<p>
<font face="Arial" size="2">
<b>SimplytheBest Scripts</b> - Find the finest scripts available on the Web in our CGI scripts and DHTML scripts and Javascript libraries.
<br></font></p>

</div>
</div>


[BACK] [TOP]

 


Copyright © 1997-2009 SimplytheBest Inc. Terms of Use and Legal Disclaimer.
All copyrights are acknowledged. All rights reserved.