If you've opened a separate sound control window using the code
(see Example 1),
then there is no simple way to stop the sound programmatically.
The user will have to close the sound control window manually.
you'll need to use the techniques described in
Let's assume that Microsoft Internet Explorer
is playing the sound file
specified by the
<BGSOUND ID="BGSOUND_ID" SRC="mySound.mid">
To stop playing the sound, you can use this code:
is a "do-nothing" sound file -
it does not play
any sound at all.
Now assume that Netscape Navigator
is playing the sound
specified by the following
<EMBED NAME="mySound" SRC="mySound.mid"
LOOP=FALSE AUTOSTART=FALSE HIDDEN=TRUE MASTERSOUND>
Then you can use the following code to stop the playback:
© 1999-2006, Alexei Kourbatov