Supported browsers
Playing audio on Web pages
Sound files, which come in a variety of formats, are handled differently and inconsistently by different browsers and on different computers. For some measure of predictability and control, users can bring audio into Dreamweaver by first inserting it into a SWF file (created by Macromedia Flash). The SWF file will be played with the Flash plug-in, which comes with most browsers. Flash is a streaming technology, so audio files can start playing even before the entire file has been completely downloaded.
JavaScript control of audio embedded in an SWF file
A SWF file can be controlled with JavaScript behaviors. For instance, the clicking of a button can trigger the playing of a SWF file which houses an audio file. Unfortunately, a few browsers do not allow JavaScript to control embedded elements such as Flash movies. (See Not all browsers support JavaScript control of embedded content [TechNote 15431] for more information.)
Below is a chart showing which browsers support JavaScript control of embedded elements:
|
Windows |
Macintosh |
Internet Explorer 4.x |
|
|
Internet Explorer 5.x |
|
|
Netscape 4.x |
|
|
Netscape 6 |
|
|
Bringing an MP3 audio file into Dreamweaver using a Flash SWF file
The tutorials in this series use both Flash 5 and Dreamweaver 4 to add audio to a Web page. They each use one kind of audio, MP3 (Motion Picture Experts Group Audio), which is embedded in a SWF file in Flash and then played or controlled in Dreamweaver. Other audio formats (such as WAV for Windows or AIFF for Macintosh) can also be added to the SWF file. The tutorials include:
|
Using Flash to add background music to a Web page (TechNote 15345) |
|
Using Flash to play audio when a button is clicked (TechNote 15326) |
|
Using Flash to play audio in a specific frame on the timeline (TechNote 15347) |
Additional information
For more information about working with audio in Flash, see the following Flash TechNotes and articles:
|
How to create a simple sound toggle (TechNote 14821) |
|
Supported audio import formats (TechNote 14068) |
|
For more information about working with audio in Dreamweaver, see the following Dreamweaver TechNotes and articles:
|
|
|
Troubleshooting the Dreamweaver 2 Control Sound behavior (TechNote 14049) |
|
What can prevent JavaScript control over audio? (TechNote 14285) |
|
Playing a sound completely before opening a page (TechNote 12903) |