specifically, make sure you create an instance of the script you're attaching to the sprite like so:

y = script("stuff").new()
sprite(newChannel).scriptInstanceList.add(y)

You can download a sample movie which creates a sprite on the fly and then uses scriptInstanceList here:

http://www.evanadelman.com/puppetTest/puppetTest.dir

Just make sure you don't judge my lingo skills by my design skills - and the whole example makes a lot more sense once you look at the code (I hope). The main magic is located in a script called "sparksFly".

Evan

Kerry Thompson wrote:

Is there a way for lingo to attach a behavior to a sprite and then unattach it as well?



Check out the scriptInstanceList.


Cordially,

Kerry Thompson

[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!]




--


_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


*m u t a n t m e d i a* > /solutions for success // // / *Evan Adelman* | 917.916.7378 | 598 Broadway NY NY 10012 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> | www.mutantmedia.com <http://www.mutantmedia.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