You should protect your 'i' by formally declaring it:
Code:
var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (var i = 0; i < p; i++){
preLoad[i] = new Image()
preLoad[i].src = Pic[i]
}
function runSlideShow(){
document.images.SlideShow.src = preLoad[j].src
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', speed)
}
But, this has little if anything to do with your question. There could be other problems but, when converting from a decimal value to a binary string you must start with a decimal number not a decimal string. Once you have a decimal number - say by doing:
Code:
var dnum=new Date().getTime();
Then you can do:
Code:
var bin=dnum.toString(2);
and you should be good to go. BTW, at present the above method used with my prior code gives an array of about 41 images. The only other problems would be if some or all of the images in the generated image array do not exist or if there is some kind of conflict in variables.
Bookmarks