> 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") <snip>
Here's your first problem. Each time you open a MIAW, you're assigning
it to the same variable, pMIAWGlobal. Every time you open a new MIAW,
you're overwriting the global variable.
Either have 8 globals, one for each MIAW, or assign them to a list
element.
> 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
And here's your second problem. You absolutely cannot have a MIAW close
itself. You're making a call to a Director function, and every call must
return. But you're destroying the calling object, so there's no place
for the return to go. Hence the script error.
Do this instead. Here's a movie script:
global gMIAWTimeOut
global gMiawName1 -- use one of your globals
on CloseModalDLOG miawName
if not voidP(window miawName) then
gMIAWTimeOut = timeOut(miawName).new(50, #mForgetWindow, VOID)
end if
end
on mForgetWindow
lWindowName = gMIAWTimeOut .name
if not voidP(window lWindowName) then
window(lWindowName).forget()
gMiawName = VOID
end if
end
In your MIAW, use this script:
tell the stage
closeModalDLOG myName -- set myName when you open the MIAW
end tell
[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!]