Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Re: Button Sounds


Message #1 by "Chris Ullman (List moderator)" <chrisu@w...> on Thu, 6 Jul 2000 16:37:56
Yes, this isn't what the INPUT tag is for in HTML, rather it's there to 
link a button to a specific piece of script. So, you might use the ONCLICK 
attribute/event to run a piece of Javascript that could run the sound for 
you.

However you'd be much better off using something like the <OBJECT> tag (not 
supported in Netscape) or the <EMBED> tag (supported by both browsers but 
not in the HTML standards).

e.g. <EMBED SRC="1.au" CONTROLS=playbutton WIDTH=37 HEIGHT=22>

Or you could create a graphic for the button and put that in the middle of 
a link:

e.g. <A HREF="1.au"><IMG SRC="button.gif" BORDER=0></A>

Basically what the link lets you do, is link to a file and then you can 
call up the outside (as in on the user's machine) media player to play the 
sound. Using <EMBED> allows you to use the browser's default in built 
player, to play the sound and the CONTROLS attribute lets you modify how 
much of that control is visible. Using <OBJECT> allows you to either use 
Windows default player for the sound type, or download a component which 
can play the sound for you.

Any more questions on this, don't hesitate to ask,
Chris

  Return to Index