Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > scrolling

Reply
Thread Tools

scrolling

 
 
Heavens.To.Murgatroid@gmail.com
Guest
Posts: n/a
 
      02-04-2007
Using SM 1.1

I have a very simple automatic scroll. See below. What I want to do
is have a mouse on to stop/pause the scrolling and mouse off to
restart it. Plus I want to be able to use it for sending out my clubs
newsletters.

So, could someone tell me what I would need to do this? And can you
explain it in simple terms.

Thanks

scroll script

<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>3</title>
</head>
<body onload="initialize()">
<script><head>
<script><head>
<script></script>
<script language="JavaScript1.2">var
currentpos=0,alt=1,curpos1=0,curpos2=-1
function initialize(){
startit()
}
function scrollwindow(){
if (document.all)
temp=document.body.scrollTop
else
temp=window.pageYOffset
if (alt==0)
if (alt==0)
curpos1=temp
else
curpos2=temp
if (curpos1!=curpos2){
if (document.all)
currentpos=document.body.scrollTop+1
else
currentpos=window.pageYOffset+1
window.scroll(0,currentpos)
}
else{
currentpos=0
window.scroll(0,currentpos)
}
}
function startit(){
setInterval("scrollwindow()",40)
}
</script> <br>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
smooth scrolling & auto scrolling sillyputty Firefox 1 08-24-2007 02:10 AM
Funny scrolling bug Alvaro G. Vicario Firefox 0 06-19-2004 12:44 PM
Firefox mouse scrolling button barasch@NOSPAM.hotmail.com Firefox 2 02-26-2004 06:38 PM
Mozilla Composer drag n' drop scrolling Jukka Hellen Firefox 2 11-26-2003 11:39 PM
Scrolling up and down Tono Firefox 0 08-23-2003 04:41 PM



Advertisments