rotating images via looping method does not work...

VERIFIED DUPLICATE of bug 74993

Status

()

VERIFIED DUPLICATE of bug 74993
17 years ago
17 years ago

People

(Reporter: webmstr, Assigned: rogerl)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
Using the following code, rotaing images does not work:
<html>
<head>
<script language = "JavaScript">
<!--
delay = 10000;
imageNum = 1;
dvlpr_image = new Array()
for (i=1; i < 9; i++)
{
        dvlpr_image[i] = new Image();
        dvlpr_image[i].src = "images/desk" + i + ".jpg";
}
imageNum = 1;
function swtch()
{
        document.dvlpr_swtch.src = dvlpr_image[imageNum].src;
        imageNum++;
        if (imageNum > 8)
        {
                imageNum = 1;
        }
      window.status = 'Time Delay is: ' + delay + ' ms';
}
function slow_down()
{
        delay+=1000;
        if (delay > 10000) delay = 10000;
      window.status = 'Time Delay Set to: ' + delay + ' ms';
}
function speed_up()
{
        delay-=1000;
        if (delay < 0) delay = 0;
      window.status = 'Time Delay Set to: ' + delay + ' ms';
}
// -->
</script>
</head>

<body>

<img NAME="dvlpr_swtch" SRC="images/desk0.jpg" ALT="[dvlpr logos]" 
onLoad="setTimeout('swtch()', delay)">

<form>
<input type="button" value="Slower" onClick="slow_down()">
<input type="button" value="Faster" onClick="speed_up()">
</form>
</body>
</html>
Actually, the problem is just that the onload handler only fires once....

*** This bug has been marked as a duplicate of 74993 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE

Comment 2

17 years ago
Verified Duplicate -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.