a question about javascript.

I have found out how to get a random picture every time you push a button (without refreshing the page). Is it at all possible to do that with
soundfiles, (and how)? I have tried i feel like everything but i can't get it to work.
Any help about this will be much appriciated.


Wouldn't you use basically the same code, except calling the sound files instead of images?

Bear in mind that sound files take much longer to download, so the transition won't be immediate.

hmm, have tried that, but can't get it to work. Do you preload sounds/midifiles the way you do it with images, or how would you write that?

I wouldn't go preloading multiple 4MB files. Look into streaming formats.

well, the midifiles i wan't to preload are about 4 k each. Can it be done, and how?


ok, found out. The problem it seemed was to get them to play. With embeds its written one way in IE, and another in Safari (which i'm using). Thanks for the help though.

oops i said that in the wrong window sorry bout that