Hi. I'm a JavaScript neophyte. I'm trying to create a JPEG animation,
with one coin (tet) morphing into another. The code doesn't work.
Anybody feel like taking a shot at correcting me? It's short. Here it
is:
<HTML>
<HEAD>
<TITLE>Thraci an tetradrachm animation</TITLE>
<SCRIPT LANGUAGE="JavaS cript">
<!-- begin script
tetSeries = new Array("tet00.jp g", "tet01.jpg" , "tet02.jpg" ,
"tet03.jpg" , "tet04.jpg" , "tet05.jpg" , "tet06.jpg" ,
"tet07.jpg" , "tet08.jpg" , "tet09.jpg" );
imagesCache = new Array ()
for (i=0;i<tetSerie s.length;i++) {
imagesCache[i] = new Image;
imagesCache[i].src = tetSeries[i]
}
theCount = 0;
function turnPage() {
if(theCount == imagesCache.len gth-1)
{
theCount = 0
} else {
theCount++
}
document.tet.sr c = imagesCache[theCount].src;
setTimeout("tur nPage()", 300);
// end script -->
</SCRIPT>
</HEAD>
<BODY>
<img name="tet" src="tet00.jpg" width="372" height="365" border="0"
alt="Tet images">
<body bgcolor="#FFFFF F"onload="turnP age()">
</BODY>
</HTML>
Thanks.
--
Coin Collecting: Consumer Guide: http://rg.ancients.info/guide
Glomming: Coin Connoisseurship : http://rg.ancients.info/glom
Bogos: Counterfeit Coins: http://rg.ancients.info/bogos
with one coin (tet) morphing into another. The code doesn't work.
Anybody feel like taking a shot at correcting me? It's short. Here it
is:
<HTML>
<HEAD>
<TITLE>Thraci an tetradrachm animation</TITLE>
<SCRIPT LANGUAGE="JavaS cript">
<!-- begin script
tetSeries = new Array("tet00.jp g", "tet01.jpg" , "tet02.jpg" ,
"tet03.jpg" , "tet04.jpg" , "tet05.jpg" , "tet06.jpg" ,
"tet07.jpg" , "tet08.jpg" , "tet09.jpg" );
imagesCache = new Array ()
for (i=0;i<tetSerie s.length;i++) {
imagesCache[i] = new Image;
imagesCache[i].src = tetSeries[i]
}
theCount = 0;
function turnPage() {
if(theCount == imagesCache.len gth-1)
{
theCount = 0
} else {
theCount++
}
document.tet.sr c = imagesCache[theCount].src;
setTimeout("tur nPage()", 300);
// end script -->
</SCRIPT>
</HEAD>
<BODY>
<img name="tet" src="tet00.jpg" width="372" height="365" border="0"
alt="Tet images">
<body bgcolor="#FFFFF F"onload="turnP age()">
</BODY>
</HTML>
Thanks.
--
Coin Collecting: Consumer Guide: http://rg.ancients.info/guide
Glomming: Coin Connoisseurship : http://rg.ancients.info/glom
Bogos: Counterfeit Coins: http://rg.ancients.info/bogos
Comment