At 08:18 -0800 03/06/2002, Mattie Wells wrote:

>Wierd? The only way of getting it to work was to give a global var a value
>from the stub of 1
>when the user clicks the exit button in the MIAW it would send a value of 2
>then I wrote a litte
>if statment in the stub
>
>global var
>on exitframe me
>if var = 2 then quit
>else go the frame
>end
>
>This doesn`t seem right to me? Theres got to be a better way?

Believe it or not, this is really not a bad plan you've hit upon 
(even if it seems rather unexpectedly baroque), as it lets Director 
know a MIAW has closed safely and that the projector can exit without 
giving you an IML32.DLL crash.

I've done variants myself of this using behaviors rather than globals 
but your method's an equally valid approach.

In my behavior I set a boolean prop to true when the window is 
opened; on each exitFrame I test to see if that's still true. If it 
is, I then see if the window has been closed or not. If it has, I do 
a forget on it and then set the boolean back to false; else I know 
the user has not clicked the MIAW's close box, so I want to leave it 
alone. Wonky, but this really is a safer way to do thigs with MIAWs 
than having them self-destruct.

-- 

              Warren Ockrassa | http://www.nightwares.com/
  Director help | Free files | Sample chapters | Freelance | Consulting
        Author | Director 8.5 Shockwave Studio: A Beginner's Guide
                    Published by Osborne/McGraw-Hill
          http://www.osborne.com/indexes/beginners_guides.shtml
[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