Hi Sephane,

> I don't think that having objects deleting themselves from their own
> scriptinstancelist is good, I seem to recall that although
> the actorlist is
> tolerant of this (ie. adjusts for deletions of objects in the
> list during
> stepframe processing), the scriptinstancelist is not.

Pity, it could have been useful.

> The psymState flag I use to flag the object as being dead so
> I can short
> circuit it's handlers if I need to until it's actually
> deleted (a "state
> engine" approach).

It's still your sprite that's deleting itself from the scriptInstanceList,
right?
But what actually happens to the instance once it's removed itself - does it
get cleaned up entirely from RAM, or does it continue "floating around" like
a ghost?

> The important part of all this is that I don't think it's
> good karma to
> delete objects from the scriptinstancelist during an event that was
> generated from director cycling through that list (ie. prepareframe,
> exitframe, enterframe, endsprite, beginsprite), otherwise
> director gets
> confused and some objects in the list may not get their sprite events.

So what you're saying is, that you can have a behavior delet itself from the
scriptInstanceList as long as the handler is called from outside?
I suppose mouse events would be the same, since on mouseDown/up/etc. you
still cycle through the list of that particular sprite.

Funny thing though: After reading your post this morning, I hit "find" to
see where EXACTLY the handler was called from, and I couldn't find any other
"deactivate" keyword anywhere. So I put a breakpoint on the handler, and
guess what? It never got activated...

So that theory is out to the dumpster, and I'm hoping that whatever I
already did yesterday to that movie will hit the jackpot during testing.

But thanks for your help - it's good to know these things in any case :)

Karina






[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]

Reply via email to