Craig A. Cunningham, Ph.D.



 

Update on Multimedia

 

To have music play in the background when a page loads:

From the DW knowledgebase:

Embedding the sound file in the page using the Insert > Media> Plugin option triggers the sound file to play when the page loads. This method enables the onLoad playback in all browsers.

The drawback to this method is that you cannot control the sound file after it begins playing. For developers who would like their visitors to have the option of pausing or stopping the sound file, Flash is the best solution. The sound file can be brought into a Flash movie and this Flash movie can be added to a Dreamweaver timeline that is set to play when the page loads. The Control Shockwave or Flash behavior in Dreamweaver can be used to provide the option of pausing or stopping the sound file.

...

How do various browsers trigger audio files?
The simplest method is to just EMBED an audio file. It will start when the page loads, and will use whatever audio player the browser prefers. You won't be able to trigger the audio by a mouseover or other JavaScript event, and will need to use an audio format which most browsers support, but a simple EMBED is the standard method of including audio when the page loads....Because of the way EMBED tags work -- you specify the MIME type, and the browser chooses an appropriate player -- you cannot predict what type of player will render your audio file. This means that JavaScript may or may not be able to control an audio file in any particular browser.

Sample page using Flash.

Instructions

See also this page.