1. To change the number of images in a slide show application, what parts of the script need to be modified? You add the image name in the parentheses after the array name. The filenames must be in quotes and seperated by a comma. Example: butter = new Array("filename.gif","filename.gif","filename.gif")
2.What does the function processNext() do? The function processNext() advances in this case the images by checking the thisPic value and adding one to that value.
3. How does the script 5.5 call the processNext() and processPrevious() functions when you click on the Next and Previous hyperlinks? The processNext function advances the images while the processPrevious funcion moves the slideshow backwards.
4.In the script 5.5, myPix is a _______________ that defines a new _____________. variable, array
5. Given the following function:
function processPrevious() {
if (document.images && thisPic > 0) {
thisPic--
document.myPicture.src=myPix[thisPic]
}
}
what will happen if the "document" understands images and thisPic is greater than zero? One will be subtracted from the value thisPic. In other words this is how you return to a previous image.
Instruction 2: Using Composer and your book's site, perform the following tasks:
1. Using script 5.5, create a slide show of four images.
2. Change the name of the GIF files of the script.
Click here to see a examples of confirm boxes.