Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing scorll speed? 1

Status
Not open for further replies.

schembri

Programmer
Aug 29, 2003
8
MT
i'm using this code
i need to know how to change the scrolling speed. thanks


function scrollit(seed)
{
var m1 = "OS3 IS NOW THE AUTHORISED APPLE DISTRIBUTOR FOR GOZO ";
var msg=m1; var out = " ";
var c = 0;

if (seed > 100)
{
seed--;
var cmd="scrollit(" + seed + ")";
timerTwo=window.setTimeout(cmd,7);
}
else
if (seed <= 100 && seed > 0)
{
for (c=0 ; c < seed ; c++)
{
out+=&quot; &quot;;
}
out+=msg;
seed--;
var cmd=&quot;scrollit(&quot; + seed + &quot;)&quot;;
window.status=out;
timerTwo=window.setTimeout(cmd,7);
}
else if (seed <= 0)
{
if (-seed < msg.length)
{
out+=msg.substring(-seed,msg.length);
seed--;
var cmd=&quot;scrollit(&quot; + seed + &quot;)&quot;;
window.status=out;
timerTwo=window.setTimeout(cmd,7);
}
else
{
window.status=&quot; &quot;;
timerTwo=window.setTimeout(&quot;scrollit(100)&quot;,75);
}
}
}
 
I think this just uses the setTimeout function to set scroll speed

timerTwo=window.setTimeout(cmd,7);

the number you need to change is the 7

just to give you some idea 1000 is around a second

hope this helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top