Background Scroller

Posted: December 12, 2007 in JavaScript Stuffs

Heading Background Scroller

Description JavaScript “Background Scrolling Automatically”

Preview N/A

Code

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 Final//EN”>
<HTML>
<HEAD>
<META NAME=”Generator” CONTENT=”TextPad 4.4″>
<LINK href=”general.css” rel=”stylesheet” type=”text/css”>
<!– Original: Roy Sinclair (roysinclair@email.msn.com) –>

</HEAD>

<BODY background=”marble.gif”>
<center><BR><BR><BR>
<script language=”JavaScript”>
<!– Begin
var backgroundOffset = 0;
var bgObject = eval(‘document.body’);
function scrollBG(maxSize) {
backgroundOffset = backgroundOffset + 1;
if (backgroundOffset > maxSize) backgroundOffset = 0;
bgObject.style.backgroundPosition = “0 ” + backgroundOffset;
}
var ScrollTimer = window.setInterval(“scrollBG(307)”, 64);
// End –>
</script>
</center>
</BODY>
</HTML>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s