von dp am 27.Februar 98 um 11:12:55:
I've been bitching about this problem for months now, but nobody seems
to have an answer. The problem is Behaviours that stop working for no
apparent reason. What happens is that a perfectly good behaviour that
has been working will somehow get corrupted. Which means that the blue
diamond button will no longer allow me to edit its parameters, and the
behaviour no longer does anything.
on getPropertyDescriptionList me
if the currentspritenum = 0 then
set memdefault = 0
else
set memref = the member of sprite the currentspritenum
set castlibnum = the castlibnum of memref
Greg McGee
-------------------------------
Hi there! The problem is not in your naming, but seems to crop up in
these "getPropertyDescriptionList" lines. Who knows why, but this "= 0"
stuff will occasionally glitch the system, and screw it up. I think it was
to avoid a problem if you used the Behaviour as a score Behaviour or
something other than dragging it onto a sprite. If you remove the first
three lines (and the final "end if"), and only use it as a sprite
Behaviour, then you might find that you've solved it.
One of our other programmers got right into programming his own
behaviors when we got Dir6, and didn't use those lines, while I used the
pre-builts that came with Director (and these lines). He never had any idea
of what problem I kept having, so I and others have strongly suspected
these lines. Since I stopped using them, I too have not seen that
"behaviour"! Good luck.
George Langley
I noticed in your script that you use the currentspritenum in
getPropertyDescriptionList.
I experienced a similar problem a while back and discovered that from
time to time the currentspritenum property gets locked to the last
current sprite (even though your movie may be stopped). When this
happens, the behavior gets completely scrambled. If you try to recompile
all scripts, you will be prompted that the behaviors description has
changed (even though you didn't touch it). Sometimes, your scripts won't
even recompile.
When your behaviors suddenly stop working, type
"put the currentSpriteNum" into the message window. If something other than 0 is
returned, there's your problem. Immediately quit Director, then
relaunch. Verify that the currentSpriteNum is now 0 and save your movie.
Everything should be Ok.
Hope this solves your problem.
Eric Mueller
D. Plänitz