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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting and stopping sounds on mouse over

Status
Not open for further replies.

TommyIndigo

Programmer
Sep 14, 2000
67
US
I need help stopping sounds based on a mouse over event for a button. I have 3 buttons, all which have sounds on their "over" event. That works fine, however if the user mouses over the buttons quickly, the sounds overlap.

What I need to do is stop any playing sounds BEFORE the new button's sound is played. If I could write a "StopAllSounds" action on the OVER frame of the button, that would work, but I can't do that. Any ideas???
 
You can't do this?

on(mouseOver){
stopAllSounds();
}

Are you playing the sounds by dropping them into the button's over frame itself or are you placing them in separate sound() objects. If it's the latter then this should work once you've defined "mySound":

on(mouseOver){
stopAllSounds();
mySound.start()
} Slainte

 
I was dropping the sounds in the button itself...I took your suggestion to use the sound object, and that worked great! Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top