Creating sound files is a subject even more complex than creating good digital graphics. The brain does not "fill in" gaps for sound as it does for images, so poor sound files are more irritating than poor quality pictures. You will need a good multimedia class to learn how to produce good digital recordings in various formats. Most digital sound files that you might use will have an extension of .au for the format originated with Unix, or .wav from the MS-DOS format or .aiff for the Macintosh format. Some may be midi. Most platforms can play any of these kinds of files. Always check file size before using sound, however, since sound can take more bandwidth than you want to use. There are several ways to insert sound files on your page. Unfortunately, those demonstrated on this page seem to work with some Netscape pc browsers but not Explorer, and perhaps not on Netscape for Mac. Since Netscape includes RealAudio, it will automatically play this sound. Explorer may merely attempt to download, which most viewers will not do. That is the problem with trying to include sound: there are few cross-browser methods aside from putting the sound into Flash or QuickTime formats. The easiest way to add a sound file is to create a link like the following: <a href="yawn.wav">Yawn.</a> This particular file is 9K and a few seconds long. (It is a courtesey to warn your audience how big a file they can expect to download if the file is large.) If you look at actual source code you will see I have added JavaScript to put an alternative caption in the message bar below. Be sure that if you do use sound, there is some alternative for those who cannot access sound.
Look at the source code to see how the following button uses JavaScript for "onClick": Of course, you might prefer to have the submit button on your form say something like "thank-you" instead of the sound I used. Continue to More Notes about Sound >> for Netscape browser or for Explorer browser
(Warning: next page loads with background sound; mute your speakers if you are in a lab or at work.) Other Comments for this Topic: The picture of the dog is by Harry
& Dorret Goodwin |
Copyright by dwang, 1999. All rights reserved.