Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 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
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what does the MASTERSOUND in the embed tag mean?
    photoshop too expensive? use the GIMP! www.gimp.org

  • #4
    New Coder
    Join Date
    Jun 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #5
    New to the CF scene
    Join Date
    Jun 2002
    Location
    middle'o'nowhere
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <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!

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •