<object id= "Aboutplayer" classid= "Clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" height=150 Width=200><param Name= "Uimode" value= "None" ></OBJECT>
<table height=100 width=200 border=3 bordercolor=blue>
<tr align=center>
<TD Bgcolor=white><font color=olive Size=2>smi Demo </font></td>
</tr>
<tr height=75>
<TD bgcolor= "Green" ><div id=captext></div></td>
</tr>
</table>
<table width=200>
<tr>
<TD align=center><input type= "button" value= "Play" onclick= "Play ()" ></td>
<TD align=center><input type= "button" value= "Stop" onclick= "Stop ()" ></td>
</tr>
</table>
<script>
function Play ()
{
Aboutplayer.closedCaption.CaptioningID = "Captext";
Aboutplayer.closedCaption.SAMIFileName = "Http://lrc.aboutplayer.com/goodbye.smi";;
Aboutplayer. URL = "http://www.111cn.net/wma/g00146001/g0014600101.wma";;
Aboutplayer.controls.play ();
}
function Stop ()
{
Aboutplayer.controls.stop ();
}
</script>
The crux of the matter is the following three sentences:
Aboutplayer.closedCaption.CaptioningID = "Captext";
The location ID of the lyrics displayed on the Web page
Aboutplayer.closedCaption.SAMIFileName = Http://lrc.aboutplayer.com/goodbye.smi;
SMI Lyrics File Address
Aboutplayer. URL = http://www.111cn.net/wma/g00146001/g0014600101.wma;
Media file Address
Put in Aboutplayer.controls.play (); The front. Where the SMI file address is best to use absolute address (with the media file address is absolute, relative and change). If the media file and SMI file naming the same path, the SMI file address can be omitted not to write.