Forum Moderators: not2easy

Message Too Old, No Replies

Play sound on click then proceed to linked page

I'm in a bit over my head, need some guidance ;-)

         

mida68

9:51 pm on Oct 20, 2003 (gmt 0)

10+ Year Member



Hello, I think this is fairly simple but I'm not familiar with multimedia so I need a little advice.

I have a client that has a "door" graphic. he wants the user to click on the door which will trigger a knocking sound and proceed to the next page.

I need to know how to link the image to both the knocking sound and then the next page. I think this might require Javascript. I'm using Dreamweaver so any help there would be appreciated. Even a clip of code would be wonderful if it's standard Javascript.

I also need to know the best format for this kind of sound. I have a .wav file but when I link to it directly, it pulls up my media player. Any advice?

Thanks!

benihana

8:36 am on Oct 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i #think# you will need some kind of media player to actually playback the sound - i doubt browsers will do it themselves internally.

flash would probably provide the most seamless user experience, but would possibly be overkill for this little effect, and comes with its own bunch of accessibility problems.

ben

limbo

11:37 am on Oct 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree with ben

I think if you imbed a sound you will still need to be sure there is a multimedia player to access it.

IE defalts to windows media player which if accessed by a web page will open the player - not wht you want.

Flash would be the least risky angle and for one link should really be too much of a accessiblity issue IMO - just make sure you provide a non flash link also.

I wonder if you could access the system sounds - you might be able to trigger one of them without launching media player - and you wouldn't need to have it downoad either.

But there might not be the sound you want and could be a security issue? and it would only work to one platform or another - sorry to waffle but it has started me thinking as I type ....

mida68

3:33 pm on Oct 21, 2003 (gmt 0)

10+ Year Member



Hello, thanks for your thoughts on this matter.

I decided to try the mouseover event for the sound and then just linked the door to the next page. It has relatively the same effect because in order to click the door you have to mouse over it. I think this skirts the accessibiliy issue because the link it not dependent on Javascript.

I found another thread here at WebmasterWorld that helped, it referred me to a Javascript Kit at: [codebrain.com...]

I managed to exchange the code with my own sound file and it seems to work well without launching a player. I have no idea why it works so well but you can read about it at the site.

Thanks for the consideration!