Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Stop playing multiple instances of a sound when cliclicking on

Status
Not open for further replies.

zachlaka

Programmer
Aug 6, 2004
6
0
0
US
Hello, I am in the process of making a simple flash soundboard.

Right now if you click on a button it plays the sound file fine but if you keep clicking on the button it plays the sound file multiple times.

I want to be able to click the button multiple times but only play the sound file on the first click All the way through. Thanks for all your help you can give.
~Zach
 
clicked = false;
myBtn.onRelease = function(){
if(!clicked){
_s = new Sound();
_s.loadSound("my.mp3,true)
_s.start()
clicked = true
}
}

something like the above ought to do

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top