I have set up a random slideshow that goes through many picture. I am wanting to add a short audio clip to each one and have them sync with the array I use for the random pictures. Below is a similar example of what I have. I'm new to JavaScript, and I've searched hundreds of places for an answer but nothing seems to work. Please help. Thank you.
UPDATE. I may not have been clear. This is what I am trying to do: My son loves animals. He's autistic, so he is constantly listing out his animals and things about them. I created a slideshow for his computer with all 500 pictures and stuff about them. It auto plays random images on one screen and he can manually browse on another. He wants to record short, 5-10 second audio with their name and something about them. I want to be able to associate his recordings with the pictures and have the recordings play each time an image changes
addImages = new Array
addImages[0] = "one.bmp"
addImages[1] = "two.bmp"
addImages[2] = "three.bmp"
addImages[3] = "four.bmp"
addImages[4] = "five.bmp"
addImages[5] = "six.bmp"
addImages[6] = "seven.bmp"
imgCt = addImages.length
firstTime = true
addSound = new Array
addSound[0] = "tada.wav"
addSound[1] = "recycle.wav"
addSound[2] = "ringout.wav"
addSound[3] = "notify.wav"
addSound[4] = "tada.wav"
addSound[5] = "tada.wav"
addSound[6] = "tada.wav"
imgCt2 = addSound.length
function rotate()
{
if (document.images)
{
if (firstTime)
{
thisAdd = Math.floor((Math.random() * imgCt))
firstTime = false
}
else
{
thisAdd++
if (thisAdd == imgCt)
{
thisAdd = 0
}
}
document.myPicture.src=addImages[thisAdd]
setTimeout("rotate()", 3 * 1000)
}
}