Forum Moderators: not2easy
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!
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
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 ....
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!