macromedia.director.lingo
[Top] [All Lists]

Re: Login Items

Subject: Re: Login Items
From: Rob Dillon
Date: Thu, 05 Jul 2007 14:03:37 -0400
Newsgroups: macromedia.director.lingo

Where are you calling that maximize() command from?

From Rando,
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on archivum
X-Spam-Level: ****
X-Spam-Status: No, score=4.2 required=5.0 tests=MISSING_DATE,MISSING_HEADERS,
        MISSING_MID,MISSING_SUBJECT,NO_HEADERS_MESSAGE,NO_RECEIVED,NO_RELAYS
        autolearn=disabled version=3.2.5

FIRST:

All I had to do was add a simple

on prepareMovie
   clearGlobals
end prepareMovie

and it never came back!

AND...

You made me understand what is going on - director maintains global
values even after restarting the movie. So if a parent script
is hooked up with a global value, it's script is not recompiled there.
Now if you change your code, the script in memory still points at lines
  in your code for debugging, which of course are not correct anymore.
So if your changes are not in sync with the memory resistent scripts
anymore, any exception that is thrown from there, points are "random"
places in your script.
With the clearGlobals command (which I was not aware of, until you
wrote about it), these parent scripts are released from memory and
won't raise exceptions anymore.

With
on prepareMovie
    clearGlobals
end prepareMovie

I can make sure that it happens every time I restart my movie.

Regards,
Rando

----------------------------
Here is my original post

Can anyone tell me why the %^$& I get a "script cast member not found"
error?

I've been working in Director for 17 years and I get this from time to time.
I generally just copy the code from the behavior, paste it into a new
behavior, name the new one the same as the old on, then copy the new cast
member over the old one and it solves it. But it happened rarely enough
that I didn't bother questioning why. I know it's not a syntax error
because the code runs fine after the above process. But it does only
happens when I've made a change to the code in that behavior.

Now I'm working with a simple movie with one parent script and a
prepareMovie handler that instantiates one child object and I'm getting this
darn error all the time. My above solution isn't working anymore. The
error points to the first line of a particular handler. That first line was
a comment. So I got rid of the comment and the new first line of the
handler is code and the error points to it. If you see where I'm headding,
no matter how many lines of "errored" code I get rid of the error alert will
always point to the first line of that handler.

I'm sure many have seen this because it's happened in almost every version
of Director I've owned. And by the way, I'm in MX on a PC.

--
Craig Wollman
Lingo Specialist
Word of Mouth Productions
212-928-9581

www.wordofmouthpros.com


-- 
Craig Wollman
Lingo Specialist
Word of Mouth Productions
212-928-9581

www.wordofmouthpros.com 



<Prev in Thread] Current Thread [Next in Thread>