Hi William
See my comments below:
>
> William Miller wrote:
>
> > I have gotten all kinds of responses to my problem and I truly
> > appreciate them all but I have had NO SUCCESS!!!!
> >
> > I need to turn off and on "ALL" sounds that I have used on my buttons
> > with a master toggle or multistate button.
> >
> > I have the code for my multistate button and I got the sound in the
> > channels to turn off and on with the soundEnabled code but the button
> > rollover and clicks are still on..........PLEASE HELP!!!!
Based on your description, I would interpret your problem to be a situation
where you would like the enduser to have the option to run in silent mode or
noisy mode (sorry couldn't think of better terminology). If this is the
case, then perhaps your sort of approaching your strategy from a bit of a
wrong angle. Let me try to explain:
If you want your master toggle to turn off all sounds and additionally
rollover effects and beeps, then simply changing the soundEnabled will most
likely not suffice as you already found out, but perhaps you can use the
method to your benefit.
I think what you need is some form of "Flag" that you can change or toggle
between true and false, this flag could be a global variable that you check
in each button to see if it is "TRUE" or "FALSE" and then either perform the
function of the handler or bypass the handler or a portion of the handler.
Unfortunately, this is a bit of a time consuming event if you have say 300
buttons on multiple screens unless you are using some common behaviours. Not
knowing your project layout I can't comment on which might be the best
alternative. The alternative to a global variable is set a property in each
behaviour using some form of Set handler
ie.
property p_Bool_SoundsEnabled
on mEnableDisableSounds( me, l_Bool_SoundsEnabled )
p_Bool_SoundsEnabled = l_Bool_SoundsEnabled
end mEnableDisableSounds
on mouseDown( me )
if p_Bool_SoundsEnabled then
-- play some sound code
end if
end mouseDown
However, if you don't want to declare a new global variable, and if you
don't want to add a property variable or if your buttons don't span the
length of the score and you you want some other method of testing a flag,
then you can still use the soundEnabled global system property as your flag,
simply checking whether it is true or false and altering your rollover code
and mouseDown code accordingly.
on mouseEnter( me )
if the soundEnabled then
-- do rollover code and play sound code
else
-- respond accordingly
end mouseEnter
No matter which way you look at, you are going to need to add some code to
your other buttons etc.. to enable disable rollover and other events that
aren't directly related to the soundEnabled system property.
I'm not sure if this kind of helps or just confuses the heck out of you.
Sincerely
Mark R. Jonkman
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]