View Full Version : Basic News Fader
RGVFMod
09-04-2008, 01:56 PM
Can anyone please direct me to a basic news fader like like here...
http://rgvsportsclassic.proboards47.com/index.cgi
I've done a search, but came up empty.
Thanks
Burito
09-04-2008, 06:24 PM
simple javascript
<script language="JavaScript1.2" type="text/javascript">
<!--
var iDelay = 4500;var txtColor = "000000";var fContent = [];fContent[0] = "<font size=\"5\">First Text Here</font>"
fContent[1] = "<font size=\"5\">Second Text Here</font>"
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>
hope it helped
RGVFMod
09-04-2008, 07:02 PM
Thanks for the code.
I tried to put in under my navbar but got nothing.
Where exactly will this go?
CarterMarkham
09-06-2008, 05:42 PM
ditto!
--------------- Added 1220727259 at 1220727259 ---------------
I cannot get it to work...
--------------- Added 1220741810 at 1220741810 ---------------
I set up proboards account, and its just an automatic insert. Would there be a necessary *.js file you need for this to work??
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.