
November 1st, 2005
06:51 AM
Neverside Newbie
Status: Offline!
Sound
Hey guys, this is what I am trying to do:
I am trying to create a page which has chinese text on it. When a user clicks on a chinese character I would like to play a short audio clip of that character being read aloud. I understand sound over the internet has been a rather touchy subject lately, and I've been out of the loop for a while so I was just wondering what the accepted method of implementing this is.
Thanks!

November 1st, 2005
11:11 AM
Neverside Newbie
Status: Offline!
I don't think there is a "perfect" way to do this. My favored way would be to use Flash and make an MP3 player, like this one: http://www.thegoldenmean.com/technique/mp3player01.html
Of course, you'd probably want a extremely simplified version of that. Some good examples of this method being put into use would be: http://del.icio.us/popular/system:filetype:mp3 and http://www.downhillbattle.org/3notes/
The problem with this method is that it might be making things too complicated, and not everyone has the Flash plug-in installed on their browser.
Another way to do this is use the embed tag.
<embed src="sound.mp3" hidden="true" autostart="true"> </embed>
You probably already know that this code will play sound.mp3 as soon as it is loaded. That would not be a good idea to have on most pages; however, if you make it apparent to the user that a sound will play when the link is clicked then you can get away with it. For example, look at the Merriam-Webster site: http://m-w.com/dictionary/sound
If you click on the speaker icon, then a pop-up window will open and it will automatically play the sound file. Most web designers like to avoid pop-ups and embed tags, but I think those can be acceptable if used correctly - like on m-w.com
I can explain in more detail both of these methods if you'd like. Good luck.
___________________
Portfolio - Blog | Posts: RSS
Join me in Neverside's Photography Discussion Channel: #photo

November 1st, 2005
09:33 PM
Neverside Newbie
Status: Offline!
Oh that's good stuff. The del.icio.us and 3notes setups are basically what I'm looking for...the only problem is that all of this is in flash. I don't have a flash authoring tool to do any of this in. For example, I'd have to swap out the images they're using in the flash file...hrmm...well maybe I don't. I'll have to think about it some more. I will agree though, that for what I'm trying to accomplish, flash would be the best suited. But I was wondering if there was another way.
Just curious though, how does del.icio.us make the jump between the anchor tag for the mp3s in their HTML to the JS which inserts the flash file? I'm looking at the source and I understand (basically) how the JS works, but can't figure out how clicking the anchor tag invokes the JS. But man, this is cool stuff! 