aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Sound multiplies with clicks? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Sound multiplies with clicks?" Watch "Sound multiplies with clicks?" New topic
Author

Sound multiplies with clicks?

Lila Fowler
Ranch Hand

Joined: Jul 31, 2009
Posts: 84
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

Courage is not the absence of fear but rather the judgment that something is more important then fear. ~ Ambrose Redmond
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You would be better using something like SoundManager 2.

Eric
Lila Fowler
Ranch Hand

Joined: Jul 31, 2009
Posts: 84
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

Joined: Jul 31, 2009
Posts: 84
I figured out what the problem was, here is a the working version.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sound multiplies with clicks?