Continous Fader

[Total: 0    Average: 0/5]

This script, once started, will continiously loop the background color.

Head Code:

<SCRIPT LANGUAGE="Javascript">
<!-- Begin
var COLOR = 999999
var woot = 0
function stoploop() {
document.bgColor = '#000000';
clearTimeout(loopID);
}
function loopBackground() {
if (COLOR > 0) {
document.bgColor = '#' + COLOR
COLOR -= 111111
loopID = setTimeout("loopBackground()",1)
} else {
document.bgColor = '#000000'
woot += 10
COLOR = 999999
COLOR -= woot
loopID = setTimeout("loopBackground()",1)
   }
}
// End -->
</SCRIPT>

Body Code:

<CENTER>
<FORM NAME="background">
<INPUT TYPE="button" VALUE="Start bgColor WARP"
onClick="loopBackground()">
<br>
<input type="button" value="Stop bgColor WARP" onClick="stoploop()">
</FORM>
</CENTER>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *