Working with Sound Clips
First, you need a sound file. Sound files come in many flavors. Not all browsers support all sound files, but any recent browser that supports plug-ins should be able to play most sound files. You can get a sound file off of the web or record your own sound file.
There are two ways to add a sound file to a web page. One way is to link to the sound file, so that the user downloads and plays it when they click on the link. The other way is to embed the sound file so that it begins to load when the page loads, and a plug-in will play it automatically when the sound file finishes downloading. (Keep in mind that embeding sounds can be very irritating to people who prefer to have the option of listening to the sound or not...when possible, give people a choice!)
To link to a sound file using Dreamweaver
The sound file usually need to be downloaded to the same WWW directory as the web page it will be linked to. Sometimes you will be able to link to a sound file somewhere else on the internet. Remember, most of us have difficulty staying within our quota anyway, and sound files can be very large....So I will assume you have transferred the sound file to this directory.
- In the Document window, select the text or image that you want to make into a link
- In the Properties Inspector, typoe the pathname for the sound file in the Link text box.
- Press Enter (Return).
- Save and preview the page in a browser. The selection will be linked to the sound file.
When the user clicks on the link on your page, one of three things will happen:
- an external program, called a "Helper App" will launch to play the sound file,
- the browser will play it using its own capabilities or thos of a plug-in, or
- if the browser doesn;t support or recognize the file type, and error will occur
To embed a sound file so that the sound plays automatically
- View the document you want to attach the sound file to in the Document window.
- Click to place the insertion point at the place in the document where you want the sound controller to appear. For invisible sound files, you can place the file anywhere, although at the top or bottom is usually more convenient.
- View the HTML source for the page in the HTML Inspector by selecting Window > HTML from the Document window menu bar
- For a sound file with no controls showing type the following line of code but substituting the name of your sound file for "yoursound.wav" in this example:
<embed src="yoursound.wav" autoplay="TRUE" hidden="TRUE"></embed>
- Save your changes to the page, and preview the page in a browser to test whether it works.
To record sound:
- To record sound, you need to log onto a Macintosh in the Mac lab (it does not work on either of the ITRC machines).
- Under the Macintosh hard drive, select the folder titled Applications.
- Then select the Macromedia Director 6 folder.
- Now select the folder SoundEdit 16 Version .
- Now select SoundEdit 16. The program will open.
- The control panel should be open. If it is not, go to View, and then select Show Control Panel.
- Before you record sound, make sure the sound properties are set up right. See below for instructions. Hold the microphone up to the stereo or someone's mouth. DO NOT hold the microphone directly up to the stereo or mouth, it should be an inch or two away.
- Hit the record button to record.
- Hit the stop button to stop.
- You can edit under the Edit menu item.
- To save, go to File and then Save As. Select the appropriate folder to save it in, name it, and make sure the file type is WAVE.
- Hit Save
To Add Sound to the Web Page:
An example of the code you need to enter in the page is:
<EMBED SRC = "rent4.wav" AUTOSTART = true LOOP = 1 HIDDEN = true VOLUME = 50> |
This line of code should go right before the start of the body.
- If AUTOSTART is set to true, the music will play as soon as the web page is open.
- Loop is the number of times that the sound file will play.
- HIDDEN Hides the code.
- VOLUME sets the volume.
Sound Properties on the Macintosh
- To change sound properties, go to the Apple in the upper left corner of the screen.
- Select Control Panel and then Monitors and Sound.
- Adjust the volume as you like it. Make sure mute is not selected.
WARNING: Please be careful not to violate copyright laws!