Forums

This topic is locked

Slideshow problem

Posted 27 Nov 2007 15:51:40
1
has voted
27 Nov 2007 15:51:40 Marty Kle posted:
Hi,
I'm trying to add a simple swap image slideshow with 6 images to my page. I found a tutorial for doing this, followed it carefully (so I thought), but it doesn't seem to work. Would someone be willing to see what the problem is? I'd be most appreciative. Here is the code:
<html><head><title>Marty Klein</title>


<link rel="stylesheet" href="index_files/style.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style6 {color: #339999; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; }
.style22 { font-size: 14px;
color: #66CCCC;
}
.style23 {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #66FFFF;
}
.style30 {font-size: 9px}
.style34 {font-size: 10px; color: #CCCCCC; }
.style44 {color: #66FFFF}
.style45 {color: #33CCCC}
body {
background-color: #666666;
}
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
color: #33CCCC;
}
.style48 {font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif;}
.style51 {color: #CCCCCC}
.style58 {
font-size: 14pt;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style62 {font-size: medium}
.style63 {font-size: 24px}
.style64 {font-weight: bold; font-style: italic; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px;}
a:visited {
color: #CC6699;
}
// Comma separated list of images to rotate
var imgs = new Array('images/tn_juneroadsidefoliages.jpg','images/tn_milkweed2s.jpg','images/tn_morningnewssm.jpg','images/tn_sumnersmall.jpg','images/tn_thatfalls.jpg','images/tn_oakleavesonboletecaps.jpg');
// delay in milliseconds between image swaps 1000 = 1 second
var delay = 3000;
var counter = 0;

function preloadImgs(){
for(var i=0;i<imgs.length;i++){
MM_preloadImages(imgs[i]);
}
}

function randomImages(){
if(counter == (imgs.length)){
counter = 0;
}
MM_swapImage('rotator', '', imgs[counter++]);
setTimeout('randomImages()', delay);
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 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 MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?")>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onLoad= onload="preloadImgs();randomImages();">
<div align="center">
<table class="outline" cellpadding="0" cellspacing="0" width="727">
<tbody><tr>
<td colspan="2"><img src="index_files/spacer.gif" height="28" width="1"></td>
</tr>
<tr>

<td align="left"><img src="about_files/mk2.gif" alt="Marty Klein" width="196" height="30"></td>
<td align="right" valign="bottom"><img src="about_files/email2.gif" alt=" 413-529-9594" width="245" height="20"></td>
</tr>
<tr>
<td colspan="2"><img src="index_files/spacer.gif" height="15" width="1"></td>
</tr>
<tr>
<td colspan="2"><img src="index_files/nav.gif" usemap="#m_nav" border="0" height="35" width="725"></td>
</tr>
<tr>
<td colspan="2"><img src="index_files/spacer.gif" height="24" width="1"></td>
</tr>

<tr>
<td colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="725">
<tbody><tr>
<td width="426"><div align="center"><a href="javascript:;" '','index_files/slides/tn_juneroadsidefoliages.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="index_files/tn_Oak%20Leaves%20on%20Bolete%20Cap%20ss.jpg" name="rotator" width="425" height="425" border="0" id="rotator"></a><br>
<br>
<span class="text style44"><br>
<br>
</span>

</div>
<p align="left" class="style6"><span class="style23"></span></p>
</td>
<td width="25"><img src="index_files/spacer.gif" height="1" width="25"></td>
<td valign="top" width="274"><p align="center"><span class="text style51"><br>
<span class="style62"><br>
<span class="style63">Fine art scanography <br>
and photography</span></span><br>

<br>
<br>
<span class="style64">Nature will bear the closest inspection. She invites us <br>
to lay our eye level with her smallest leaf, and take an <br>
insect view
of its plain.</span> <br>
<span class="style48">Henry David Thoreau </span> <br>

<br>
<br>
</span><span class="style51">I hope you enjoy browsing through the site as much as I enjoy creating the images you see here. New works will be added to the galleries regularly.<br>
<br>
I welcome email and phone inquiries.</span><br>
<br>
<span class="style45 text style58"></span></p>
<p align="center"> <span class="text style44"><br>

<br>
</span><br>
<!-- SiteSearch Google -->
<span class="searchtext">
</span></p>
<span class="searchtext">
<form method="get" action="www.google.com/search">
<input name="ie" value="UTF-8" type="hidden">
<input name="oe" value="UTF-8" type="hidden">

Search:<br>
<input name="q" size="31" maxlength="255" value="" type="text">
<input name="btnG" value="Google Search" type="submit">
<input name="domains" value="martykleinart.com" type="hidden"><br><input name="sitesearch" value="" type="radio"> WWW <input name="sitesearch" value="martykleinart.com" checked="checked" type="radio"> martykleinart.com<br>
</form>
</span>

</td>
</tr>
</tbody></table>
</td>
</tr>
<tr>
<td colspan="2"><div align="center" class="style22"><span class="style30"><span class="style34"><img src="index_files/spacer.gif" height="24" width="1"><font face="Verdana, Arial, Helvetica, sans-serif"><img src="index_files/spacer.gif" height="24" width="1">COPYRIGHT
2007 MARTY KLEIN. ALL RIGHTS RESERVED</font></span></span></div></td>
</tr>
</tbody></table>
</div>
<map name="m_nav">
<area shape="rect" coords="480,6,637,28" href="photopage_one.htm" title="Photography Portfolio" alt="Photography Portfolio">

<area shape="rect" coords="296,6,460,28" href="scanpage_one.htm" alt="Scanography Portfolio" title="Scanography Portfolio"><area shape="rect" coords="149,6,271,27" href="/bio.htm" title="Bio / CV / Exhibitions" alt="Bio / CV / Exhibitions"><area shape="rect" coords="73,5,125,27" href="/about.htm" title="About" alt="">
<area shape="rect" coords="4,5,57,28" href="/index.htm" title="Home" alt="Home"><area shape="rect" coords="662,5,711,29" href="links.htm" title="Links" alt="Links">


</map>
</body></html>

Thanks so much!
Marty

Reply to this topic