- Adding Sound, Shockwave, and Flash files
- Sound Files
- Sound File Parameters
- Netscape Plug-ins
- Shockwave and Flash
Sound File Parameters
Embedding a sound requires a plug-in, which is no sweat for browsers that support such things. If you want to use Dreamweaver to insert these parameters into a sound plug-in file (rather than typing them into the code), see the section "Extra Parameters," later in this chapter (in the printed book).
Here's the skinny on some of the different parameters you can use with sound files that use the <embed> tag:
-
src=" " (required) The source of the file.
-
name=" " Name the embedded file if you want to call it from a script. If you use the name value, you must also include the mastersound attribute (no value).
-
controls=console|smallconsole|true|false (Required for visible controllers.)
-
hidden=true|false Determines whether the controller is visible.
-
autoplay=true|false Determines whether the sound begins playing as soon as it loads.
-
volume=0%-100% Percent of system volume used.
-
loop=true|false|n Determines whether the sound will loop continuously. A setting of loop=3 would make the file loop three times.
-
height and width (Required for visible controllers.) Determines the height and width of the controller. For console: height=60 width=144. For smallconsole: height=15 width=144. When you adjust the height and width of an embedded controller, its placeholder changes shape in the Document window.
-
align="LEFT|RIGHT|TOP|BOTTOM" Defines alignment for visible controllers.
-
HSPACE="n" VSPACE="n" Sets space around visible controllers.
-
type="MimeType" Use for listing the mime type of a plug-in.
A standard audio controller (Figures 9 and 10) would have the following settings:
<embed src="sounds/yoursound.wav" height="60" width="144" controls="CONSOLE" autostart="FALSE" loop="FALSE"></embed>
The standard Netscape LiveAudio sound controller, embedded in a page. LiveAudio plays .AIFF, .AU, .MID, and .WAV files, and others.
The same controller in Explorer. Note that it ignores the given dimensions.
Tips
-
If the source for the sound file isn't correct, the console will not show up in Navigator.
-
Quotation marks are not essential for anything but SRC, but Dreamweaver prefers them.