I have a wav file that I would like played (not downloaded) when someone click on a play button gif. Does anyone know how to go about to acheive this?
If this cannot be done or if there is a better way please let me know.
I tried <embed src="file.wav" autostart="false" hidden="false"> but IE5 didn't react well to it.
Is this really that hard?!? You used to see this done all the time 2 or 3 years ago on personal homepages. Doesn't anyone remember how they did it?
Hmmm, how did I completely miss this thread? :confused:
The code to do it on both browsers (IE and Netscape have different code for embedding sounds) was (as far as my sketchy memory can be recalled - I'll fix it up when I get home and get my reference out) :
<embed src="yourmidi.mid" (+other attributes)><noembed><bgsound src="yourmidi.mid" (+other attributes)></noembed>
The embed src applied to Netscape, and bgsound src applied to IE.
To embed properly in IE5 I believe you need to use the <object> tag (which is another kettle of fish in itself) - I'll post again when I can find the code. Try the embed/bgsound src for now and it should work reasonably in both browsers.
Good luck! :)
For some reason I'm not having any luck in IE5. I haven't even tried NS yet.
IE also reacts weird to the embed code. It gives me the following error when I load the page:
The data the plugin requested, did not download succesfully.
(Yes, there really is a comma there!)
And Dreamwaver 4 doesn't recognize the <noembed> tags.
I didn't think this would have been so complicated. I already did it before, I just don't remember how since it was so long ago! :D