I have taken slide show script from net. But There some functions i cannot understand here is script
Ok I figured it out. My code had many errors.
imageItem
is a constructor function designed to preload images. It returns the src (location) of the image that it preloads.
However the function get_ImageItemLocation()
assumes that imageItem has returned an object.
The whole thing should simplify to:

Play slide show |
Pause |
Previous |
Next
Well If you want imageArray
to be an array of image urls, then the simplest way is: ...
function imageItem(url) {
var img = new Image();
img.src = url;
return url;
}
for(var i=0; i<5; i++){
imageArray[i] = imageItem(imageDir + i + ".jpg");
}
Note how imageItem
is called without new
in this case. Hope you will understand it now. Let me know if you have further problem with this code.