Use your JavaScript editor to open Music.htm and examine the code.
To play a sound file (in this case Canyon.mid) we are going to use the Media Player ActiveX. It ships with any installation of Windows and can be used to play sound files, animations and video.

An example of how to add Media Player to your Web page is given below. Only the most useful parameters are shown, for a complete list have a look at the Music.htm code.

<OBJECT id=MPlyr classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95
align=left width=0 height=0 style="VISIBILITY: hidden">
    <PARAM NAME="Filename" VALUE="Canyon.mid">
    <PARAM NAME="AutoSize" VALUE="0">
    <PARAM NAME="AutoStart" VALUE="0">
    <PARAM NAME="ClickToPlay" VALUE="0">
    <PARAM NAME="PlayCount" VALUE="1">
    <PARAM NAME="ShowControls" VALUE="0">
    <PARAM NAME="ShowAudioControls" VALUE="0">
    <PARAM NAME="ShowDisplay" VALUE="0">
    <PARAM NAME="ShowPositionControls" VALUE="-1">
    <PARAM NAME="ShowStatusBar" VALUE="0">
    <PARAM NAME="ShowTracker" VALUE="0">
</OBJECT>

Once the Media Player object is defined you can use its ID in your JavaScript functions to invoke the object's methods, such as MPlyr.Play() or MPlyr.Pause().

In this example the Media Player plays the sound file but remains hidden (style="VISIBILITY: hidden"). By changing the parameters you can control the size, appearance and other properties of the Player. Most importantly, by changing the "Filename" parameter you can use it to replay AVI, MPEG, MOV, MP3 and other types of Multimedia files.



[Home] [Products] [Support] [Download] [Orders] [Links]

Address: C Point Pty Ltd, 71 Williamson Road, Para Hills 5096, Australia
Phone: +618   8263 3623 Fax: +618   8396 1477
Web: http://www.c-point.com Email: c-point@c-point.com