This content has been marked as final. Show 8 replies
> So how can I open a new window with a movie that is already playing with a
> different member on the stage? Is this possible?
If you mark the Director file as read-only you can open as many copies
as you like and they will all be independent of one another.
You just have to remember to uncheck this at the OS level when you need
to edit the file - it becomes a little frustrating as it's easy to
forget. Still, you can save with a different filename and not lose
changes you might have made.
You will need to provide different names for each of the windows,
though, or you'll start overwriting them in the windowList:
aWindow = window().new("glossary")
might need to become:
tName = "glossary" && string(count(_player.windowList) + 1)
aWindow = window().new(tName)
So I can use that code in the glossary itself. It is possible to open another window of the same file from a hyperlink within that file?
> It is possible to open another window of the same file from a hyperlink within that file?
Yes, as long as you do as I suggested (mark it read-only and provide a
unique window name)
Indeed, your code works. Thank you.
Hmmmm. Now I'm having trouble with my little close button. I have the glossary movie set to be a Dialog box with no frame. I have my own little close button. How do I let the close button know that it is supposed to close the window that it is in. I had 0n mouseUp window("glossary").close(). But if 2 glossary windows are open the first one, not the top one closes. Then I tried:
Trying to get the name of the aWindow, but that doesn't work either. The current window will close but the close button has no effect on the rest. I need to get the name of the current window and I don't know how.
> I need to get the name of the current window and I don't know how.
Sorry, I could have been more verbose:
-- #score script (behavior):
on mouseDown me
-- #movie script:
However, the above is unsafe and will lead to a crash in iml32.dll on
Windows. Not every time, but sometimes. The standard analogy for this
crash is sawing off the branch you're sitting on - the lingo execution
engine runs one line of code at a time. It runs the 'forget()' line and
disposes with the window *in which the current handler resides*.
Suddenly there /is/ no next line of code to run.
There are different solutions to this problem, most of which you'll find
by searching this newsgroup. One involves setting a global and
monitoring it from a regularly executed handler (like a frame event) in
a different window (like 'the stage'). I'm less enamoured with this
approach as I'd rather have windows be more self-contained than this
allows, so I use the following parent script:
-- #parent script: "window.closer.class"
on new me, aWindow
pWindow = aWindow
t = window("stage").movie.timeOut().new(string(me), -1, #mClose, me)
on mClose me, aTimer
and I call it from the #closeWindow event like you've used above:
I didn't have luck with the parent script. (could be because I'm exhausted and ready to collapse). I have a stage with 2 MIAW on it already. One of them opens the first of the glossary MIAW. But I don't think that is the problem.
But the "unsafe" script did work and until my head is clearer I will stick with that and keep my fingers crossed.
> But the "unsafe" script did work
It will only cause a crash from a projector; and like I said it won't
happen every time, but it *will* happen...