Figure 1   playSnd


 <HTML>
 <HEAD>
 <SCRIPT>
 function playSnd() {
     //Is there a sound card?
     if (snd1.issoundcardenabled()) {
         //Has enough downloaded that it can play?
         if (snd1.readyState >= 3)
             snd1.Run();
     }
 }
 </SCRIPT>
 </HEAD>
 <BODY>
 The page of <FONT COLOR=blue onmouseover="playSnd()">sound</FONT>.
 <OBJECT id=snd1 CLASSID="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A"
 style="visibility:hidden">
 <PARAM NAME="FileName" VALUE="snd1.wav">
 </OBJECT>
 </BODY>
 </HTML>


Figure 2   readystatechange


 <HTML>
 <HEAD>
 <SCRIPT FOR=snd1 EVENT=readystatechange(a)>
     if (a >= 3)
         alert("Ready to play")
 </SCRIPT>
 
 <SCRIPT FOR=snd1 EVENT=statechange(a,b)>
     if (b == 0)
         alert("Stopped playing the sound")
 </SCRIPT>
 
 <SCRIPT>
 function playSnd() {
     //Is there a sound card?
     if (snd1.issoundcardenabled()) {
         //Has enough downloaded that it can play?
         if (snd1.readyState >= 3)
             snd1.Run();
     }
 }
 </SCRIPT>
 </HEAD>
 <BODY>
 The page of <FONT COLOR=blue onmouseover="playSnd()">sound</FONT>.
 <OBJECT id=snd1 CLASSID="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A"
 style="visibility:hidden">
 <PARAM NAME="FileName" VALUE="snd1.wav">
 </OBJECT>
 </BODY>
 </HTML>