> does anyone know or cant enlighten me on how to creat a toggle button
> for a project I am almost done with......I have two images for the
> different stated and I need the code to make it work!!...I am brain
> dead at this point...It is for the master sound control on the cd to
> turn it off and on...Thanks
> --

The code example below assumes that You want a button that turns the
possibility of sound to be present on and off.
It does not start the sounds themselves since I assume that sound are
started at various points in the application.


<UNTESTED>

global gGlobalAudioState

on mouseUp me
    if pGlobalAudioState then
        repeat with aChannel = 1 to 8
            sound(aChannel).stop()
        end repeat
        gGlobalAudioState = FALSE
    else
        gGlobalAudioState = TRUE
    end if
end mouseUp

</UNTESTED>

with this model every statement that starts a sound should check the
gGlobalAudioState variable and only play a sound if gGlobalAudioState is
TRUE.

Is this something like what You meant?

Bjarne
_______________________________________________________
If it's true that we are here to help others, then what exactly are the
OTHERS here for?

Bjarne Nyquist
Researcher, Lingo Programmer
The Interactive Institute, phone: +46-(0)8 783 24 74
www.interactiveinstitute.se
----- Original Message -----
From: "William Miller" <[EMAIL PROTECTED]>
To: "Lingo List" <[EMAIL PROTECTED]>
Sent: Sunday, May 20, 2001 6:01 PM
Subject: <lingo-l> Sound toggle button



> William J. Miller
> P.O. Box 540303
> Houston Texas 77254
> 214-476-5111
> [EMAIL PROTECTED]
>
> [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!]



[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!]

Reply via email to