JavaScript Manipulating Plug-ins


Please wait for the sound file to be loaded...
(Check your status bar for the progress)

The Code:

<script>
/*
This Script is Created by Reaz Hoque.
More Scripts can be found at:
http://rhoque.com/book
email: [email protected]
*/
function moreVolume(form){
myVolume = ( document.Mysound.GetVolume() + 5 ) ;
if ( myVolume>= 100 )
alert("Sorry! We are playing volume at 100%!");
else{
if (document.Mysound.IsPlaying())//find out if the music is playing
document.Mysound.setvol(myVolume);
}
}
function lessVolume(form){
myVolume = ( document.Mysound.GetVolume() - 5 ) ;
if ( myVolume<=0 )
alert("Sorry! We are playing volume at 0%!");
else{
if (document.Mysound.IsPlaying())
document.Mysound.setvol(myVolume);
}
}
</script>
</head>
<BODY bgcolor="#FFFFFF" text="#000000" link="#0000FF" alink="#FF000000" vlink="#551a8b">
<h1 ALIGN="CENTER">JavaScript Manipulating Plug-ins</h1><br>
<i>Please wait for the sound file to be loaded... <br>(Check your status bar for the progress)</i>
<EMBED SRC="alert.au" HIDDEN=TRUE NAME="Mysound" MASTERSOUND AUTOSTART=yes LOOP=NO>
<ul>
<li><a href="javascript:void(document.Mysound.play(false))">Play
Sound</a><br>
<li><a href="javascript:void(document.Mysound.pause())">Pause
Sound</a><br>
<li><a href="javascript:void(document.Mysound.stop())">Stop
Sound</a><br>
<li><a href="javascript:void(document.Mysound.fade_from_to(50,20))">Fade
Sound</a><br>
<li><a
href="javascript:void(document.Mysound.fade_from_to(20,50))">Reset
Volume</a><br>

</ul>
<p>
<form><input type="button" value=" Volume + "
onClick="moreVolume(this.form)"><input type="button" value=" Volume - "
onClick="lessVolume(this.form)">
</form>

Last Updated: Sunday, December 13, 1998