| *dreamer 2004-09-19, 7:15 pm |
| You are exciting to know now how to do it, right? In this example, I use midi
file because it give a high quality sound. I Here is how to use an <EMBED> tag:
<EMBED SRC=your_file.mid AUTOSTART=true WIDTH=144 HEIGHT=60 LOOP=1>
AUTOSTART=true means automatically play sound when document is loaded. This
way, the sound will play as a background sound. You can also set the value to
false. The sound will play when the "play" button is clicked.
LOOP=n This tells browser how many times to play sound. n could be an integer,
true, or false. Setting LOOP=true, browser will continue playing your sound
until the stop button on the console is clicked.
WIDTH and HEIGHT This is how the sound control (console) will be displayed.
Setting them as the given numbers, browsers will display a full console.
Setting the width=0 and height=2, the console will not displayed by the
browsers. Other values that too small will cause the browsers display
uncompleted image. You might also hide it by placing HIDDEN=true like this:
<EMBED SRC=your_file.mid AUTOSTART=true HIDDEN=true LOOP=1>
It's a good idea to give an alternative to people who using browsers that do
not support the embedded sound. Here is what I did on this page:
<embed src="bgsound.mid" hidden="true" autostart="true" loop="1">
<noembed>Your browser doesn't support EMBED, but you can still listen to the
background sound of this page by<a href="bgsound.mid"> clicking
here.</a></noembed>
Browsers that do not support EMBED will display the link inside <noembed> tag.
Hope its some use jimmybill
|