Hi Colin and list

Thanks for the advice, you were right about the bad syntax, as we are trying
to copy the stuff from books that seem to be all wrong.  Things seem to be
working better, but we are still having trouble.
Let me try to explain the problem a bit better :
I have a sprite that opens a MIAW using the following code:

global gMiaw
on mouseDown me
set gMiaw to window "Win1"
set the filename of gMiaw to "Saq 1.dir"
set the Title of gMiaw to "xxx"
set the windowType of gMiaw to 4
open gMiaw
tell the stage to go to frame 101


This opens the MIAW no problem, but then we want to give a proper order to
close the window and have it cleared from RAM.  We tried the script from
Colin, with the following variables

on closewindow gMiaw
forget gMiaw
tell the stage to go to frame 90
end

But then what happens is that the window gets closed but not cleared from
RAM.
To answer Mark, the second script is placed in the stage movie script, not
in the MIAW, as Colin suggested.

We also tried to give an order from the MIAW :

Tell the stage to close window gMiaw

But this didn't work because of the following error "Handler undefined".

I know there is a big gigantic mistake hanging under our nose, but we are so
spaced out on this project for the last few days that we can't see clearly
what we are doing anymore.

THANKS in advance




Colin Holgate wisely wrote, on 18/03/01 16:44

>> On closeWindow
>> Tell thestage to go to frame x
>> End
>> 
>> OR
>> 
>> On stopmovie("mymiaw")
>> Forget(the activeWindow)
>> End
>> 
>> OR
>> 
>> On closeWindow forget(the activeWindow)
>> 
>> OR
>> 
>> On closeWindow forget window("nameofwindow")
> 
> 
> I'm pretty sure you just typed these in from memory, but on the off
> chance you pasted them, none of them are right. Forget isn't a
> function, so the handler to close the window should be:
> 
> on closewindow
>   forget the activewindow
> end
> 
> To tell the stage to do something, you would say:
> 
> on closewindow
>   tell the stage to go to frame x  --the stage is two words, not one
> end
> 
> 
> As I say, I think you typed them in here, and that your real routines
> may be correct syntax, but maybe you didn't do both things in
> combination:
> 
> on closewindow
>   forget the activewindow
>   tell the stage to go to frame x
> end
> 
> 
> This makes me think, who gets the closewindow message anyway? It
> could be that the stage is getting it, in which case you would put
> this into the stage movie script, and not in the MIAW at all:
> 
> on closewindow
>   forget the activewindow
>   go x
> end
> 
> [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!]
> 
> 

-- 
Alex Czetwertynski
Disciple Films Paris
www.disciplefilms.com





[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