Okay, even if you get away with this in authoring, it will crash in a projector.


You cannot forget the active movie MIAW from the MIAW itself. Basically that's pulling the rug out from under its feet. The mouseUp function needs to return somewhere, and if the movie has disappeared, you are looking at a crash.

The technique I've advocated since, I don't know, 1998, is like this:

(MIAW side)

on mouseUp
  global gWindowToKill
  gWindowToKill =the activeWindow
end


(stage side) on idle (or exitFrame or something often run) global gWindowToKill if not voidP(gWindowToKill) then forget(gWindowToKill) gWindowToKill =VOID end if end

If you have multiple windows then I would advocate adding them to a kill list, instead of a single variable.

- Tab



At 06:30 PM 7/22/03, Locke Morgan wrote:
I have 8 movies that I am trying to tie together under an initial console.
The main console has buttons that open a MIAW for the individual movies.
All works well until I try to open a 2nd movie.

My opener script is:

on mouseUp me
  global pMIAWGlobal
  pMIAWGlobal = window(the moviePath & pMIAWFile & ".dir")
  pMIAWGlobal.fileName = (the moviePath & pMIAWFile & ".dir")
  pMIAWGlobal.windowType = 0
  pMIAWGlobal.modal = TRUE
  pMIAWGlobal.visible = TRUE
end

My closer is in a button in the MIAW:

on mouseUp me
  close(the activeWindow)
  forget(the activeWindow)
  tell (the Stage) to go to frame 5
end

I can open any of the 8 movies as long as it is the first one opened.  One
caveat is a smaller movie with very little coding that can be loaded first
and not interfere with a subsequent MIAW.  It should be noted that these
movies are similar and so there is a lot of redundant code between them.

My theory is that there are some global variables hanging around after the
movie is closed that is causing the script error.  But, I thought that the
forget() command should take care of that.

Regards, Locke


[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!]

[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