Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member Amber Ingraham's Avatar
    Join Date
    Jul 2011
    Location
    Iowa
    Posts
    26
    Member #
    28702
    Liked
    8 times
    Hello fellow web developers!

    I'm having issues with a sound file that plays on the click of a picture. The problem is that it plays correctly the first time, and any time after that it seems like it ...skips? I don't know a darn thing about java script, but I'll post my code that I'm using. I simply manipulated code off of a website in my long search for code that would work the way I wanted.

    Explaining what's wrong would probably just be over my head, so I really just need the code corrected where ever it is messing up the sound. Thanks for the help in advance!

    <script language="javascript" type="text/javascript">
    function playSound(soundfile) {
    document.getElementById("dummy").innerHTML=documen t.getElementById("dummy").innerHTML +
    "<embed src=\""+soundfile+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" />"; } </script>

    <span id="dummy" onclick="playSound('my url is here');"><img src="my picture link is here" /></a></span></p>

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    When you say it skips - do you mean it skips the whole sound file or do you mean it sounds like a vinyl record skipping/
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Junior Member Amber Ingraham's Avatar
    Join Date
    Jul 2011
    Location
    Iowa
    Posts
    26
    Member #
    28702
    Liked
    8 times
    It plays the file from the beginning 3 times... IE: the file should say "BodhI" ... the file plays "Bo-Bo-Bo-Bodhi" ... Weird.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com