Jump to content

I want to use a sound file


Guest sudoku
 Share

Recommended Posts

Hi, I'm new to this forum and am not sure if I have the the correct one, but here is my problem.I want to add a short sound file such as .wav to play when an image is clicked withoutit showing the media player as a page, or if it does show the media player it should close itand go back to the page the image is on. Is there a way to do this.I'm a beginner at css, but have been using html for a while. I can't find a way to do this.I'm in need of some guidance. All I've been able to come up with is <a href="/sounds/laugh.wav"><img src="/gif/gifa/redrose180.gif"</a> John

Link to comment
Share on other sites

It would probably be easiest to use a Flash-based player that you can control with Javascript, you should be able to find some online. If necessary you can hide the actual player so it doesn't show up on the page.http://www.google.com/search?hl=en&saf...mp;aql=&oq=
The quotation as I know it was, "He that defends himself in court, has a fool for a lawyer". To enable background sound is quite simple, ie, <bgsound src="music/waltzingmatilda.wma">, I used this in my website and it was beatiful, it is now not online so you can't check it, it only worked with IE, but that was 12 months ago.Cheers,Bill Whicker.
Link to comment
Share on other sites

Besides only working in IE, bgsound isn't part of the HTML specification and thus its use should be avoided. Bill, if you are really so concerned about what JSG says BF said, just message him instead of randomly inserting the assertion into posts :).

Link to comment
Share on other sites

The quotation as I know it was, "He that defends himself in court, has a fool for a lawyer". To enable background sound is quite simple, ie, <bgsound src="music/waltzingmatilda.wma">, I used this in my website and it was beatiful, it is now not online so you can't check it, it only worked with IE, but that was 12 months ago.Cheers,Bill Whicker.
P.S. The beautiful singer was, "Helmut Lotti".
Link to comment
Share on other sites

Thank you very much for your replies, I'm sure you are all right. However, I don't want to use bgsound, I want to play a short (2 or 3 second) .wav file once in the background when the image is clicked and then have it go away untill it's clicked again.I don't know anything about flash or flash players. If I went that way, would the viewer have to have flash too?As it is, the only thing I've found that comes close opens the windows media player and the player won't go away by itself. if the player "has" to open as a page, it should be polite then and go away until the image is clicked again. I thought this would be simple. John :) Here' the page I'm trying it on. It has to work in IE or it's no use.http://mountaindream.freeoda.com/pages/pgtest6.html

Link to comment
Share on other sites

Yes, the user has to have the Flash player installed in order to hear the sound. That shouldn't be a problem though. Web browsers do not have a lot of built-in support for sound like this, they all use the operating system's support, which is why you see the sound open in your media player. If you don't want the browser to use your media player the best way is to have Flash play the sound. It will work like you want it to for everyone who has Flash, and people who don't have Flash simply won't hear the sound. So, it's simple if you want the sound to open in the user's media player. If you don't want that, it's slightly less simple.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...