This code was helped by a few people and special thanks to Ben a.k.a Bangers for creating image swapping code. This discussion could be found at thread215-43476.
Basically, you have the embeded WMP and is controlled with only 1 button. When click on the Stop button, the image will swap to a Play button and the Audio will stop. Vice versa.
If you use this code, do make sure you set the correct files for your audio. It supports all kinds. If you want to see the WMP default controls on your site. Go to the <object> tag and set showcontrols to true. And if you don't want to autostart when entering your site. Set to false at the param. Do what ever you want. It works.
I had hidden the WMP. So if you want to see it...change the width and height greater than zero at the object tag.
[color red]<HTML>
<HEAD><TITLE>Windows Media Player Test</TITLE>
<script language="JavaScript">
<!--
var myImageOn = new Image();
myImageOn.src = 'Images/play.gif';
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.