|
||||
Link to soundSimply selecting a piece
of text and creating a link in the Properties Inspector. Link to music.mid
|
BehaviorsTo attach a sound to the page or an object on it you can use a Behavior. From the Behavior pallet select play sound and browse for the file to play. The start action can then be modified from the drop down list. Note the numer of option will depend on the target browser selected. The example on the right has a Sound file with Behavior attached to the picture of the girl. It should play a sound on passing the mouse over the picture? The example below uses an "onclick". Code for the first example
right: The second block is a JarvaScript
hidden in the head statement, see below... |
Behaviors Example |
||
Dreamweavers CodeThe program creates all the required code for you! To view the code for this page right click and selet view source. Or from the main tool bar select view > view source. |
<script language="JavaScript" type="text/JavaScript"> < !-- function MM_controlSound(x, _sndObj, sndFile) { //v3.0 var i, method = "", sndObj = eval(_sndObj); if (sndObj != null) { if (navigator.appName == 'Netscape') method = "play"; else { if (window.MM_WMP == null) { window.MM_WMP = false; for(i in sndObj) if (i == "ActiveMovie") { window.MM_WMP = true; break; } } if (window.MM_WMP) method = "play"; else if (sndObj.FileName) method = "run"; } } if (method) eval(_sndObj+"."+method+"()"); else window.location = sndFile; } //--> < /script> |
Pop the Baloon!On Click Sound |
||
Embedded or Linked Sounds
|
Please download my notes for using plugins in Adobe PDF format. (Printer friendly) |
|
![]() |
||
|
©Complete Image06/07/2003
|