designofthings
asked on
Sound play / image swap
I'm looking to have an image be clicked to start a sound file playing (wav or mp3 - ideally mp3) . . . no need to show a player. The moment the image is clicked the image changes to another image (the same image except with a pause button implemented). It stays as the new image even when the mouse is moved away from the image. When the user clicks the image again the sound file stops playing and the image returns to the original.
ASKER
Thanks, Jeremy . . . this looks like its what I need. I think I just need a little more hand holding in terms of how to play separate mp3 files for each ID (currently this setup plays the one file). Again, thanks for your help!
You bet, I am about done for the night but if you need some help let me know and I will install it on my test stie and help you figure it out.
ASKER
Yes, if you could just demo how a second mp3 file can play from a second button (right now they have 3 buttons all playing the same file - and i can't see a reference to the mp3 file in the index.html code). . . it references the SWF file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
designofthings:
I have been busy as of late, did you get it figured out?
I have been busy as of late, did you get it figured out?
ASKER
Hi Jeremy,
Are you still around? I got the whole thing working OFFLINE, and now that I bring it ONLINE the sound files aren't loading (the image/button swap is working fine). I'm using 400k-1mb+ files for now (trying to get those downsized) . . . does this player stream the sound? I've waited to see if it's delayed loading the sound but that doesn't seem to be the case. Any ideas?
Mark
Are you still around? I got the whole thing working OFFLINE, and now that I bring it ONLINE the sound files aren't loading (the image/button swap is working fine). I'm using 400k-1mb+ files for now (trying to get those downsized) . . . does this player stream the sound? I've waited to see if it's delayed loading the sound but that doesn't seem to be the case. Any ideas?
Mark
Make sure the directory path is correct and that the .mp3 is on the end of the file. I think it is best to compress the mp3's for them to load faster.
ASKER
Yes, I've decreased the bitrate to 64 kbps and tried a relative and absolute path on the mp3 file (along with the .mp3 extension). Can you try these files online/offline? The girl with the striped pants should play the mp3 file when clicked.
If you put any old mp3 file in the root with the bonfire.html file it should work (rename it Nurse_3thPhase101710.mp3). Expert exchange won't let me upload an mp3.
bonfire-files-2.zip
If you put any old mp3 file in the root with the bonfire.html file it should work (rename it Nurse_3thPhase101710.mp3).
bonfire-files-2.zip
ASKER
I've been uploading this all to my personal server . . . just got access to the final server today and uploaded the files and voila. . . works on that server. So no problem now.
awesome
http://www.strangecube.com