PDA

View Full Version : Auto scrolling window



Hinsh
03-05-2007, 09:24 PM
Copy the below and paste under body IF YOU WANT MUSIC! Futher down is the scrolling window


<SCRIPT language="JavaScript">
if (navigator.appName == "Netscape" && navigator.appVersion.indexOf("Win") > 0)
{
document.writeln("<embed type=application/x-mplayer2 pluginspage=http://www.microsoft.com/Windows/MediaPlayer/ Name=MediaPlayer src=midi/journey.mid AutoStart=True ShowStatusBar=0 HEIGHT=1 WIDTH=1></embed>");
}
else if (navigator.appVersion.indexOf("Win") > 0)
document.writeln("<BGSOUND SRC=midi/journey.mid LOOP=INFINITE VOLUME=-500>");
else
document.write( '<embed src = "midi/journey.mid" autostart="true" hidden="true" loop="true" ></embed>' );
</SCRIPT>

Here copy the below for the self scrolling window. I activates when the user hit the down arrow button. Also place under body.

<SCRIPT language=JavaScript1.2>
if(navigator.appName.indexOf("WebTV") != -1)
var x=1
else
{
var x=1
var cp=0,alt=1,curpos1=0,curpos2=-1
function initialize(){
startit()
}
function sw(){
if (document.all)
temp=document.body.scrollTop
else
temp=window.pageYOffset
if (alt==0)
alt=2
else
alt=1
if (alt==0)
curpos1=temp
else
curpos2=temp
if (curpos1!=curpos2){
if (document.all)
cp=document.body.scrollTop+x
else
cp=window.pageYOffset+x
window.scroll(0,cp)
}
else{
cp=0
window.scroll(0,cp)
}
}
function startit(){
setInterval("sw()",50)
}
window.onload=initialize
}
</SCRIPT>

To preview it Check Out http://llerrah.com/mygarden.htm Let me know if it don't work.