This scrolling credits window is not something you see every day on the Web, but we thought it was sufficiently stupid to include. Created by Builder.com producer Paul Anderson, it pops up a window with scrolling credits, just like at the end of a big- Step One var winOpts = 'resizeable=no,scrollbars=yes,width=400,height=300'; function popUp(pPage) { //--> Step Two This code goes in the <HEAD> of your page: scrollID=0; function onWard() { // done hiding --> Step Three
First, set the link to the pop-up window in your existing page. To do this, you need to add the following JavaScript to that page's <HEAD>: <SCRIPT language="JavaScript">
Then add a link to this window somewhere in the body of your document:
<!-- hide javascript
popUpWin = window.open(pPage,'popWin',winOpts);
}
</SCRIPT> Want to see the credits? Click <A href="javascript:popUp('credits.html')">here</A>.
This link will open up a small pop-up window. In our example, the HTML document credits.html is being called for that window. You should either name the next document you create credits.html, or be sure to make the link consistent with the filename you use.
Now create the document that contains the credits. This will be a standard HTML page; you can set the background, font colors, and sizes, as you would with any page. There are just a few things you need to add. <SCRIPT language="JavaScript1.1">
You will need to adjust the number in the statement vPos%=1000, which determines when the credits restart. In our example, it's set to 1000. The figure you choose may cause the screen to reset before the credits are done, or the process may wait too long to start over, depending on how much content you put in the window. Play with the value until you get the effect you want.
<!-- hide javascript
vPos=0;
vPos+=2;
window.scroll(0,vPos);
vPos%=1000;
scrollID=setTimeout("onWard()",40);
}
</script>
Add the following event to the <BODY> tag of credits.html: <BODY onLoad="if(window.scroll)onWard()">
Step Four
Add the text to the page. To smooth out the scrolling effect, you may want to add extra space at the top and bottom of the page. Just add a series of <BR> tags.
Stupid Web Tricks: Create a scrolling credits pop-up window
Click here for our complete list of Stupid Web Tricks.
No messages found
No messages found
Log in to display your contacts' posts.
Once logged in, adding contacts is simple. Just mouse over any member's photo or click any member's name then click the "Follow" button. You can easily manage your contacts within your account contacts page.



