View Full Version : on key down play sound and change image
03-19-2012, 09:37 PM
I'm trying to make a website where when certain keys are pressed, (in this example the key can be "a") it triggers an image change and plays a sound that loops at the same time. Is this possible? I also wanted to have a function where if you click a certain area it changes the sounds for each key to a different one. Should the whole script be nested within an if else statement where if that function is clicked, it causes the sounds to be the second set and if it isn't, they play as the normal set? I'd also prefer to not use HTML5 audio tags if possible.
03-19-2012, 11:04 PM
Cross-browser rendering of sounds is a nightmare in pre-HTML5. Unless you are very, very experienced, I would advise - forget it!
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
03-19-2012, 11:17 PM
Yeah I wasn't sure thanks for the input! I'll think of something else to do.
03-19-2012, 11:19 PM
Is this possible?
yes it is. This info (http://x10hosting.com/forums/programming-help/98138-play-sound-keypress.html) might be a solution for you.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.