Hi Jasper,
I'm not sure if you want to close the stage or a MIAW.

If you want to  close the projector then just use the halt command.

To close a MIAW you can use either forget the window(making a window forget
itself is not recommended).
To do a cleaner job of that is to create a global flag which indicates
whether the MIAW has to be open or closed. In the stage you could have a
script running on exitFrame which checks the value of that flag and when it
is TRUE, it should open the window or close it when it's FALSE. When you
wish to close the window, set the flag to FALSE from the MIAW. The script
on the stage will then forget the MIAW.

Your scripts might be lined in this order

-- Stage frame script
global gWindowName
global gWindowOpenFlag

on exitFrame me
     if gWindowOpenFlag then
          -- Make sure the window is not open so that it doesn't open
repeatedly
          if NOT (the windowList.getPos(gWindowName)) then
               gWindowName.open()
          end if
     else
          -- Make sure the window is open before calling the forget command
on it
          if (the windowList.getPos(gWindowName) then
               gWindowName.forget()
          end if
     end if
end exitFrame me


-- The script for the button in the MIAW
global gWindowOpenFlag

on mouseUp me
     gWindowOpenFlag = FALSE
end mouseUp me


Regards,
Pranav


<snip>

does anyone know how to program a button in lingo, which closes the active
window where the movie is playing in?
<snip>





[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