Hello List,

I am building a program where I need to remove the behaviours from a sprite
at one point and then reattach further down the score.  This all takes place
within the same sprite span.  The much simplified version of how I was
trying to handle it, is as follows:


global gBehaviorScriptsToReattach

on mouseUp me
-- save the scriptList for later use and then wipe out existing scripts
gBehaviorScriptsToReattach = sprite(x).scriptList
llDummyList = []
sprite(x).setScriptList(llDummyList)
end

on exitFrame me
-- put previously saved scripts back
sprite(x).setScriptList(gBehaviorScriptsToReattach)
end

In actuality, this process takes place by calling different methods from the
same object, but the logic is there.  Seems to work during authoring, but
not at runtime.  However, I didn't see any documentation as such?  I have
also tried using scriptInstanceList, but ran into errors when it tried to
execute the reattached behaviours.  Just looking for the best way to handle
this!

Thanks!
-_Craig


Craig Taylor
Renegade Digital Media inc.
www.renegadedigital.com


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