PDA

View Full Version : (problem)using javascript play sound when buttom click..



lovelyfat
03-03-2007, 02:41 AM
I have a javacript which can play a sound when user click buttom. it works perfect on one page , when I copy code to another page , it doesn't work..
can you please check it for me and let me know what's going wrong with new page and hot to fix it? thank you very much...

---------------------------------------------------------------------
4 image buttoms ( d0-27.gif,d0-58.gif,d0-61.gif,d0-59.gif)

play full sound when user click "d0-27.gif "
pause sound when user click "d0-58.gif "
contiue sound when user click "d0-61.gif "
stop playing sound when user click "d0-59.gif "
----------------------------------------------------------------------
my code for these buttoms is below

<img alt="play" height="19" src="../../images/c/d0-27.gif" width="19" />
<a onclick="MediaPlayerPause();" onmouseover="this.style.cursor='hand';" style="cursor: hand">
<img alt="pause" height="19" src="../../images/C/d0-58.gif" width="19" /></a> <a onclick="MediaPlayerPlay();"
onmouseover="this.style.cursor='hand';" style="cursor: hand">
<img alt="continue" height="19" src="../../images/C/d0-61.gif" width="19" /></a>
<a onclick="MediaPlayerStop();" onmouseover="this.style.cursor='hand';" style="cursor: hand">
<img alt="stop" height="19" src="../../images/c/d0-59.gif" width="19" /></a>

-------------------------------------------------------------------------

I guess I have to add somthing on block of <script type="text/javascript"> ~</script>

in block <script type="text/javascript"> ~</script>
now is like below ( these code is for a float iFrame)

==========================================================
<script type="text/javascript">


</script>
==========================================================


when I click image button it continue to showing "error: must have a object"
did I miss something now? :confused: please help

thank you very much and my you all have a nice day:)