FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

News Fader

 


minik
Is there a way to make a news fader like the ones on Proboards forums?

I've tried Google but had no luck. Could somebody help me, please?

~MiniK~
alalex
could you post a link to an example please?
minik
There's one at the top of www.cherubforums.com
Azmo
javascript, not sure what it's called tho..

fContent ?

try google for something like "fading text javascript" "text roller javascript" and stuff like that..
aningbo
correct me if i'm wrong. didn't get wat u mean to say but there's the html code:

Code:
<html><head><title>Fading here</title>


<body bgcolor="#000000">

<div id="fscroller" style="padding: 2px; font-size: 12px; font-family: Verdana,Arial; font-weight: bold; width: 100%; height:

15px; opacity: 0.9; color: rgb(255, 255, 255);">To join, click register on the black bar at the top of the page.</div><script

language="JavaScript1.2" type="text/javascript">
<!--
var iDelay = 2000;var txtColor = "FFFFFF";var fContent = [];fContent[0] = "Welcome to the forum, dedicated to the CHERUB

series by Robert Muchamore!"
fContent[1] = "Don't be shy, get posting and have your say."
fContent[2] = "To join, click register on the black bar at the top of the page."
fContent[3] = "You will receive a confirmation code via email"
fContent[4] = "Once you confirm your account, log-in and you will be able to read and post messages."
fContent[5] = "But before you do that, make sure you read the <a

href=\"http://cherubseries.proboards34.com/index.cgi?board=rule&action=display&thread=1089581428\"

target=\"_blank\">Rules</a> and the <a

href=\"http://cherubseries.proboards34.com/index.cgi?board=rule&action=display&thread=1124576459\" target=\"_blank\">FAQ</a>"
fContent[6] = "Press the reply button to post you can also start your own threads and polls."
fContent[7] = "Have fun!"
fContent[8] = "<a href=\"http://www.cherubforums.com\" target=\"_blank\">www.cherubforums.com</a>"
var isIE = (document.all)? true : false;var frame = 60;var st = 1;var wait = iCur = 1;var index = iCurMoz = 0;var iDir =

false;var frameHalf = frame / 2;var iTimer;var frame_m = frame;var wait_m =

wait;document.getElementById("fscroller").style.color = txtColor;function fade(){   if(index >= fContent.length){      

index = 0;   }   document.getElementById("fscroller").innerHTML = fContent[index];   index ++;   

opacityFade();}function opacityFade(){   var fScroll = document.getElementById("fscroller");   if(frame > 0){      

if(frame == frameHalf && wait > 0){         if(isIE){            fScroll.style.filter =

"alpha(opacity=" + iCur + ")";         } else {            fScroll.style.MozOpacity = iCurMoz;   

      }         wait --;         setTimeout("opacityFade()", iDelay);      }

else {         if(iDir){            iCur -= 3;            iCurMoz -= 0.03;   

      } else {            iCur += 3;            iCurMoz += 0.03;      

   }         if(isIE){            fScroll.style.filter = "alpha(opacity=" + iCur + ")";   

      } else {            fScroll.style.MozOpacity = iCurMoz;         }      

   if(frame == (frameHalf + 1)){            if(isIE){               

fScroll.style.filter = "alpha(opacity=" + iCur + ")";            } else {               

fScroll.style.MozOpacity = iCurMoz;            }            iDir = true;         

}         frame --;         setTimeout("opacityFade()", st);      }   } else {   

   fScroll.innerHTML = " ";      frame = frame_m;      wait = wait_m;      iDir = false;      

setTimeout("fade()", st);   }}// -->
</script>

<script language="JavaScript" type="text/javascript"><!--
fade();function setWindowStatus(ws){window.status=ws;}function

mouseOverHighlightCell(tcell){tcell.style.backgroundColor="40454C";}function

mouseOutHighlightCell(tcell){tcell.style.backgroundColor="444444";}// --></script>


</body></html>
Azmo
ye everyone can choose "show source" but I it's often alot easier if you find jsut that piece of code on google.. I'm no javascript expert, so I have no clue if all that is necissary or not.. and should be easier to learn if you found it on google and only got what u needed.. but ye, u can always choose to show the source and try to sort it out if you know your javascript.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.