Thanks, Luc
<HTML>
<HEAD>
<TITLE>test</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!--
var counter=1;
function rollPics(){
document.display.src=counter+".jpg";
counter++;
if(counter>3){
counter=1
}
}
//einde-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD><IMG NAME="display" WIDTH="100" HEIGHT="100"
SRC="1.jpg" onLoad="setTimeout('rollPics()',3000)"></TD>
<TD><FONT FACE="Arial, Helvetica, sans-serif"
SIZE="-1">tekst</FONT></TD>
</TR>
</TABLE>
</BODY>
</HTML>
>The timeout before a new image appears should be regular, but... it is
>not.(Perhaps because the image is in a table?) Does anyone have a
>suggestion how to improve this script? Or an alternative script.
The reason it is not regular is becuase the images take a different
time to load, and therefore there isn't a constant 3 seconds between
them, there's 3 seconds + time taken for next image to download.
Preload the images (see any preloading script e.g. x=new
Image();x.src="imageurl" ) and then just call RollPics() with a
setInterval of 3000 or use setTimeout() in the end of RollPics.
Jim
Even when the images are cached, the interval isn't regular (the images
are sometimes shown to short in NN4.5 on the macintosh), for an example go
to: http://www.robenpetit.nl/na/roestvast/roestvas.htm
>Hello Jim
>
>Even when the images are cached, the interval isn't regular (the images
>are sometimes shown to short in NN4.5 on the macintosh), for an example go
>to: http://www.robenpetit.nl/na/roestvast/roestvas.htm
But that doesn't effect the actual problem preloading was not the key
part of the change I suggested, the change was purely removing it from
the onLoad event, have it independant of it.
Jim.
I have a script for this perhaps it will give you
some ideas (IE4+ enhanced)
http://www.icysoft.com/imgswp.htm
--
Best Regards
Vidar Petursson
http://www.icysoft.com
The...@icysoft.com
icy...@vortex.is
No matter where you go there you are
-
Luc Brouns <g...@lucbrouns.demon.nl> wrote in message
news:37D8EFF2...@lucbrouns.demon.nl...
> The timeout before a new image appears should be regular, but... it is
> not.(Perhaps because the image is in a table?) Does anyone have a
> suggestion how to improve this script? Or an alternative script.
>
> Thanks, Luc
>
> <HTML>
> <HEAD>
> <TITLE>test</TITLE>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
>
> <SCRIPT LANGUAGE="JavaScript">
> <!--
> var counter=1;
> function rollPics(){
> document.display.src=counter+".jpg";
> counter++;
> if(counter>3){
> counter=1
> }
> }
> file://einde-->
Luc Brouns wrote:
> The timeout before a new image appears should be regular, but... it is
> not.(Perhaps because the image is in a table?) Does anyone have a
> suggestion how to improve this script? Or an alternative script.
>
> Thanks, Luc
>
> <HTML>
> <HEAD>
> <TITLE>test</TITLE>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
>
> <SCRIPT LANGUAGE="JavaScript">
> <!--
> var counter=1;
> function rollPics(){
> document.display.src=counter+".jpg";
> counter++;
> if(counter>3){
> counter=1
> }
> }