PDA

View Full Version : Disabling button sounds


kmartin7
08-19-2004, 05:46 PM
Is there any way to set a button's onClick sound to mute or off programatically?

kmartin7

yosik
08-20-2004, 04:06 AM
As far as I know, not directly.
But you can have a button trigger an external sound (not the build-in sound function). This way, you can have complete control when and if to play that sound (you could also play different sounds from the same button, based on previous fulfilled condition).
Good luck.
Yossi

kmartin7
08-20-2004, 06:13 AM
Thanks Yosik. I was hoping that I wouldn't have to manually play a sound as there are several buttons and conditions. I guess I can cut-and-paste.

=)

yosik
08-20-2004, 06:36 AM
Don't forget that you can use variables (and even better, a table) for your buttons<->sound pairs. Then you can condition control your sound triggering.

Yossi

Worm
08-20-2004, 07:32 AM
Also FUNCTIONS. It'll make life a lot easier if you roll it into a function. That way you'll only have one place to edit/change code.



Thanks Yosik. I was hoping that I wouldn't have to manually play a sound as there are several buttons and conditions. I guess I can cut-and-paste.

=)

kmartin7
08-20-2004, 07:33 AM
OK. Thanks.