MoveObject_Behavior:
property sp
on beginSprite(me) sp = sprite(me.spriteNum) end
sp is not going to get set here. BeginSprite has fired before you attach your script.
on exitFrame(me) sp.locH = sp.locH + 1 end ---------------------------- I run the movie and in the Message Window:
t = script("MoveObject_Behavior").new() sprite(1).scriptInstanceList.add(t)
and get a script error: Property not found.
Easiest thing to do is pass the spritenumber to the new handler:
t = script("MoveObject_Behavior").new(sprite(1))
sprite(1).scriptInstanceList.add(t)(replace the beginSprite with this) on new me, whatSprite sp = whatSprite return me end
hth, Kurt
[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!]
