File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sound multiplies with clicks?

 
Lila Fowler
Ranch Hand
Posts: 84
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a webpage where I need a sound to be played one the user clicks the image,
this work correctly the first time but one the clip is finished, and I push the button the second time.
The sound plays twice at the same time. By setting the hidden tag to true you can see that an extra
player pops up and both players start playing at once?

Here is a smaller version of the code:





Any ideas on how I can remove the player once the clip is finished? Or to prevent multiple playing's?

Thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would be better using something like SoundManager 2.

Eric
 
Lila Fowler
Ranch Hand
Posts: 84
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks but the above requires a download and uses flash... I am only supposed to use js and html.
Does anyone have any ideas how to fix this in html? If it provides the functionality to play a sound
then there should be a way to close the player?

Thanks
 
Lila Fowler
Ranch Hand
Posts: 84
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured out what the problem was, here is a the working version.

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic