The problem is that there can be no trailing comma after the last entry in the imagearray. Here's one way to avoid that:
Code:
var mygallery = {
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [380, 469], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
<?php $q2 = mysql_query("select * from home_flash");
$i = 0;
while($res = mysql_fetch_array($q2))
{
$image[$i] = $res[1];
$text[$i] = $res[2];
$str = "['images/fla/".$image[$i]."','','','".$text[$i]."'],";
echo $str;
$i++;
}
echo "['images/fla/','','','']";
?>
//<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "always",
togglerid: ""
};
mygallery.imagearray.pop();
new fadeSlideShow(mygallery);
Bookmarks