Each window (the stage and every individual MIAW) has its own namespace for everything except globals. If myScript is not declared as a global in your MIAW, the your MIAW cannot access it. If myScript is a cast member, then you will have to link the MIAW to the same external castLib that holds the cast member. If the castLibs in the MIAW are not in the same order, then a global gMember may point to a different member in the same relative position.
Does this help you to find the source of the problem?
No, this doesn't help - but thanks.
Scope I understand.
I'm not sure what "gMember" is though and why it would be relevant here. Can you explain?
namespace? this is the first reference I've heard to anything in Director. Sounds like a dotnet thing. no?
Also - keep in mind that if I run the MIAW outside of the parent - just in Director all by itself, the movie plays fine and instantiates the object with no problem.
Confirmed - can't use the same castlib for some reason. Probably has to open it exclusively or something like that.
Anyway - I moved my script to a different, non-shared cast and it worked fine. I'll just create a castlib that links in the same scripts but is not the same castlib.
Try making the shared library read-only
Thanks Sean. However, that didn't work.
I ended up with a common list of external scripts that I just link into two casts - one for the parent movie, one for the MIAW.
Seems kind of screwy and I'm not sure about the results yet. MIAW's seem cool, but I'm having trouble with understanding who owns what. For example, in a script object created in the "startmovie" event for the child movie, I reference member("amember").text and it fails - no properties which indicates, of course, that it can't find the cast member. It's there, in the Internal cast for the child movie. I'm guessing, at this point, that it only looks at the cast members of the parent movie?
One thing that works well is communicatin between the primary movie (stage) and the MIAW. You can do thing like:
on the MIAW timeline, call something like:
And vice versa where the stage can call out to the MIAW:
Therefore, what I tend to do is put almost no code into the MIAW score, apart from "local" stuff, which is only needed by the MIAW. Then it can sort of act as a black box controlled by the stage.