> --in the MIAW
> tell the stage
>       forgetTheMIAW
> end tell
> 
> --in the stage movie
> on forgetTheMIAW
>       global gMIAWglobal
> 
>       forget gMIAWglobal
> end
> 
Whoa--that will guarantee a crash. When forgetTheMIAW finishes
executing, it will try to return control to the MIAW, which no longer
exists.

You have to set a flag and have the stage check that flag. I've seen a
couple of good solutions posted. I use a timeout object:

In the MIAW:

tell the stage
   CloseModalDLOG
end tell

in the main movie:

on CloseModalDLOG 
    gTeacherPrefsTimeOut = timeOut(gMiawName).new(50, #mForgetWindow,
VOID)
end

on mForgetWindow 
  lWindowName = gTeacherPrefsTimeOut.name
  if not voidP(window lWindowName) then
    window(lWindowName).forget()
    gMiawName = VOID
  end if
  gTeacherPrefsTimeOut.target = VOID
  gTeacherPrefsTimeOut.forget()
  gTeacherPrefsTimeOut = VOID 
end

Cordially,

Kerry Thompson
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/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