Scrolling Text

free web hosting
Free Web Hosting, No Ads > General > Hosted Members Area

Scrolling Text

Jesse
I have this code in my ftp as "scroll.js"

QUOTE
/*
Fading Scroller- By DynamicDrive.com
For full source code, 100's more DHTML scripts, and TOS,
visit http://www.dynamicdrive.com
*/

var delay=2500 //set delay between message change (in miliseconds)
var fcontent=new Array()
begintag='<font face="verdana" size=2>' //set opening tag, such as font declarations
fcontent[0]="We are currently looking for ZN Chat Hosts to assist in the running our Chat Room on the TSC Network. For more information visit the ZN Chat Page."
fcontent[1]="<strong>Forums</strong><br>Are Forums are going through a ReVamping. They are now online. You can visit the ZN Forums at the links on this page."
fcontent[2]="We wish to thank TSC for allowing us to have our Chat Room on there Network. Visit TSC here <a href=http://www.tscchat.com/>TSC</a>"
closetag='</font>'

var fwidth=150 //set scroller width
var fheight=150 //set scroller height

///No need to edit below this line/////////////////

var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0
var index=0

if (DOM2)
faderdelay=2000

//function to change content
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("fscroller").style.color="rgb(255,255,255)"
document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
colorfade()
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag
else if (ns4){
document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[i
ndex]+closetag)
document.fscrollerns.document.fscrollerns_sub.document.close()
}

index++
setTimeout("changecontent()",delay+faderdelay)
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

frame=20;
hex=255  // Initial color value.

function colorfade() {         
// 20 frames fading process
if(frame>0) {
hex-=12; // increase color value
document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.
frame--;
setTimeout("colorfade()",20);
}
else{
document.getElementById("fscroller").style.color="rgb(0,0,0)";
frame=20;
hex=255

}

if (ie4||DOM2)
document.write('<div id="fscroller" style="border:0px solid black;width:'+fwidth+';height:'+fheight+';padding:2px"></div>')

window.onload=changecontent



The problem with this is that it fades in and out going to the next message. However I want to have it so it scroll up and continues through. So instead of fadin in and out it will constantly scroll up.

Thanks again for your help guys and gals.

 

 

 


Reply

rvalkass
I think you want a vertical scroller. Try this script:

http://www.hypergurl.com/verticaltext.html

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : scrolling text

  1. I Need Help With Text Over Images - (8)
  2. Text Sizes - (7)
    When i make my site using the HTML Editor and then copy that the edit file part but when i view the
    file after saving it, the text in the navigation bars is bigger than it was in HTML Editor, does
    anyone know how this happens. Also how do i replace the Welcome to your Hosting account page...



Looking for scrolling, text

Searching Video's for scrolling, text
advertisement



Scrolling Text



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE