I'm using Internet Explorer for now and I've copied the script above...my cpmFetch folder is inside coppermine (cmg is the directory). I'll paste my code below:
<html>
<head>
<script>
var slideShowSpeed = 9000
var crossFadeDuration = 5
var Pic = new Array()
var a = 0
<?php
include "./cpmfetch.php";
$objCpm = new cpm("/cmg");
$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_viewRandomMediaFrom(1000, 1000, "");
$counter=0;
foreach ($data as $row) {
$imagename = $objCpm->getImageToUse($row['pFilepath'], $row['pFilename'] ,"normal_");
if(substr($imagename,strlen($imagename)-1,1)=="/")continue;
if($counter++ > 20)break;
print "Pic[a++]='" . $imagename . "'\n";
}
?>
var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
preLoad = new Image()
preLoad.src = Pic
}
function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.SlideShow.filters.blendTrans.Apply()
}
document.images.SlideShow.src = preLoad[j].src
if (document.all){
document.images.SlideShow.filters.blendTrans.Play()
}
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
}
</script>
</head>
<body onload="runSlideShow()">
<img src="./cmg/displayimage.php?album=1&pos=0" name='SlideShow'>
</body>
</html>
The error I get is: Line 53 - object expected
By the way, I've verified that my cpmFetch is working properly by running the test.php file and the pictures display fine...the code for it is as follows:
<?php
include "cpmfetch.php";
$objCpm = new cpm("/cmg");
$objCpm->cpm_viewLastAddedMediaFrom(4,1,"album=1");
$objCpm->cpm_close();
?>