Hi,
This is a newbie's question. I want to preload 4 images and only when
all 4 images has been loaded into browser's cache, I want to start a
slideshow() function. If images are not completed loaded into cache,
the slideshow doesn't look very nice.
I am not sure how/when to call the slideshow() function to make sure it
starts after the preload has been completed.
Thanks in advance for your help!
Terry
*************** *************** *************** *************** *
<head>
<script language="JavaS cript" type="text/JavaScript">
<!--
function MM_preloadImage s() {
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.leng th,a=MM_preload Images.argument s; for(i=0; i
<a.length; i++)
if (a[i].indexOf("#")!= 0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a
[i];}}
}
function slideshow() {
.....
}
//-->
</script>
</head>
<body onload="MM_prel oadImages('01.j pg','02.jpg','0 3.jpg','04.jpg' )">
</body>
</html>
This is a newbie's question. I want to preload 4 images and only when
all 4 images has been loaded into browser's cache, I want to start a
slideshow() function. If images are not completed loaded into cache,
the slideshow doesn't look very nice.
I am not sure how/when to call the slideshow() function to make sure it
starts after the preload has been completed.
Thanks in advance for your help!
Terry
*************** *************** *************** *************** *
<head>
<script language="JavaS cript" type="text/JavaScript">
<!--
function MM_preloadImage s() {
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.leng th,a=MM_preload Images.argument s; for(i=0; i
<a.length; i++)
if (a[i].indexOf("#")!= 0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a
[i];}}
}
function slideshow() {
.....
}
//-->
</script>
</head>
<body onload="MM_prel oadImages('01.j pg','02.jpg','0 3.jpg','04.jpg' )">
</body>
</html>
Comment