I'm trying to create a script that will cycle through a bunch of pics
(1.jpg, 2.jpg, and so on up to 429.jpg) to make a movie. However, I
can't get it to work. Could someone tell me what I'm doing wrong?
Here it is...
<html>
<head>
<script>
pics = new Array()
curPic = 0
preLoad() {
for (i=0; i <= 429; i++) {
pics[i] = new Image()
pics[i].src = i + ".jpg"
}
}
dispPic() {
document.images['moviePic'].src = curPic + ".jpg"
curPic++
setTimeout("dis pPic()", 20)
}
</script>
</head>
<body>
<body onload="preLoad (); dispPic()">
<img src="1.jpg" name="moviePic" width="640" height="416">
</body>
</html>
(1.jpg, 2.jpg, and so on up to 429.jpg) to make a movie. However, I
can't get it to work. Could someone tell me what I'm doing wrong?
Here it is...
<html>
<head>
<script>
pics = new Array()
curPic = 0
preLoad() {
for (i=0; i <= 429; i++) {
pics[i] = new Image()
pics[i].src = i + ".jpg"
}
}
dispPic() {
document.images['moviePic'].src = curPic + ".jpg"
curPic++
setTimeout("dis pPic()", 20)
}
</script>
</head>
<body>
<body onload="preLoad (); dispPic()">
<img src="1.jpg" name="moviePic" width="640" height="416">
</body>
</html>
Comment