Web Analytics Made Easy -
StatCounter embedding .wav files - CodingForum

Announcement

Collapse
No announcement yet.

embedding .wav files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • embedding .wav files

    I usually find sound annoying, but presently I need to be able to allow visitors to a particular site listen to clips from a CD they may or may not be purchasing.
    The page I've set up to test is:

    http://195.184.240.253/JESSICATEST.cfm?rn=18841

    My code is:
    <input type="button" value="play" onClick="document.vid.DoPlay()" name="buttonstart">
    <input type="button" value="stop" onClick="document.vid.DoStop()" name="buttonstop">
    <embed src="igocrazy.wav"
    align="baseline" border="0" hidden="true" controls="smallconsole"
    autostart="true" loop="true" name="vid">
    <br>
    <font size="1" face="Verdana">Paul Davis - I Go Crazy</font>

    I keep getting an error, can you tell me what I've done wrong?
    <3 Jess.

  • #2
    you could try something like this

    -----

    <script language="javascript">

    function playSound(){

    document.cdplayer.play()

    }
    function stopSound(){

    document.cdplayer.stop()

    }
    </script>

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

    <embed src="Wav.wav" name="cdplayer" MASTERSOUND>


    Hope this helps
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

    Comment


    • #3
      what does the MASTERSOUND in the embed tag mean?
      photoshop too expensive? use the GIMP! www.gimp.org

      Comment


      • #4
        I wanted to know what's wrong w/ my code though - I'm sure yours would work (it did) but I really didn't want the entire player visible.
        If anybody can help I'd really appreciate it.
        <3 Jess.

        Comment


        • #5
          <html>
          <head>
          </head>
          <body>
          <input type="button" value="play" onClick="document.vid.DoPlay()" name="buttonstart">
          <input type="button" value="stop" onClick="document.vid.DoStop()" name="buttonstop">
          <embed src=" "
          align="baseline" border="0" hidden="true" controls="none"
          autostart="true" loop="true" name="vid">
          <br>
          <font size="1" face="Verdana">Paul Davis - I Go Crazy</font>
          </body>
          </html>

          Take off the "DoPlay" and "DoStop" on the input onClick on both buttons and put "Play" and "Stop". It worked for me so I hope it works for you too. Oh yeah, I don't know if this affected anything but change the value of controls on the embed to none instead of smallconsole. Good Luck!

          Comment


          • #6
            MASTERSOUND. Well what it does is allows that emebed to have control. So if you did not name the embed like name="jukebox" then it will play the MASTERSOUND. Its kind of a backup if something was to go wrong.
            CYWebmaster.com - See why we dot com!!
            ACJavascripts.com - Cut & Paste Javascripts!
            SimplyProgram.com - Personal Blog

            Comment

            Working...
            X