Dreamweaver MX: Play Sound Tutorial
Learn how to do this simply by following the steps below.
Play Sound on Mouseover or MouseClick
1. First, create a link so the sound will be played on click or Rollover. Create a simple text link through the ‘#’ symbol.
2. Next, add a behaviour to the link by clicking on the Behaviours Panel on Windows/Behaviours.
3. Then click the '+' symbol in the Behaviours Panel. Select 'Play Sound' and find the sound you want to play. When you have found the sound you want, click on OK.
4. If you want the music to be brought about by other events, return to the Behaviours Panel and under it, choose another event. For Rollover, choose the ‘onMouseOver’ option.
Bringing an embedded SWF file into Dreamweaver
1. First, create an SWF file with an embedded MP3 audio file. Then, create a new document in Dreamweaver and save the file before embedding the already embedded SWF file.
2. Next, place the pointer at the insertion point. The file could be inserted anywhere within a table or layer.
3. Then, click on Insert and choose Media and then select Flash. After that, insert the embedded SWF file and click Select (Windows) or Open (Macintosh).
4. Click Windows on the menu bar and select Properties. Then using the Property Inspector, name the Flash file.
5. Create a link with a JavaScript ‘control” behaviour. Then select the link.
6. Open the Behaviours toolbar by clicking Windows on the menu bar and selecting Behaviours. Then click the ‘+’ icon.
7. After that, choose between Control Shockwave or Flash. On the dialog box, choose the Go to frame option and type 2 in it. Then click OK.
OnMouseDown is the default event that will trigger the SWF to play. In case you would want to change it, go to the Behaviours Panel and select the events column. Here choose which event to trigger the SWF file to play.
Original Authors: Roz
Edit Update Authors: M.A.Harris
Updated On: 27/04/2009