Thanks Dave,
i used gOpenMiaw  because i have 3 other MIAWs open from other buttons. This 
is to keep reference to which MIAW is to close when the 'close' button is 
pressed. I've tried the code you gave me, but still doesnt work.  I use 'put 
' command to check which MIAW window it's refering to, and it's the right 
one. But why is it not able to find the same miaw to 'forget' ?

>  global gOpenMiaw, gCloseMiaw, gAirMiaw
>
>  on exitFrame
>
>    if gCloseMiaw then
>     gOpenMiaw = gAirMiaw (for other miaws, i use gOpenMiaw = gSecondMiaw 
>or gOpenMiaw = gThirdMiaw)
>      gOpenMiaw .close()
>      put gOpenMiaw      -- this gave me "(window Air Review 1)" in the 
>message window
>      gOpenMiaw .forget()
>    end if
>    go the frame
>
>  end


>Martha
>
>It looks like you are very close to the right sort of code, but I wonder if
>the reference gAirMIAW is still pointing to the window as you are then 
>using
>gOpenMIAW.close() and gOpenMIAW.forget()   And the object error is seeing
>this.  Why have you used gOpenMIAW instead of the original gAirMIAW.  Try
>the following code, sorry haven't tested it but I had the same problem and
>this is the way I resolved it.
>
>global gAirMiaw
>on mouseUp me
>    gAirMiaw = window ("Air Review 1")
>    gAirMiaw.filename = the moviePath&"dirs"&the
>itemDelimiter&"airreview1.dir"
>    gAirMiaw.windowType = 2
>    set aRect1 = rect (400,80,600,480)
>    set gAirMiaw.rect = aRect1
>    gAirMiaw.visible = true
>end
>
>on mouseUp me
>    tell the Stage
>      -- remove the following line and just keep gAirMiaw as the reference 
>to
>your MIAW
>      --gOpenMiaw = gAirMiaw
>      gCloseMiaw = 1
>    end tell
>end
>
>  global gOpenMiaw, gCloseMiaw, gAirMiaw
>
>  on exitFrame
>
>    if gCloseMiaw then
>     -- change the MIAW ref to gAirMiaw
>      gAirMiaw .close()
>      gAirMiaw .forget()
>    end if
>    go the frame
>
>  end
>
>
>Dave MacDougall

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


[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