> does this mean that i have to specifically set all properties of those
> behaviours that are set using the pop-up box like:
>
> sprite(x).pMyproperty=value
I wouldn't recommend it! (that's bad OOP, and besides, what if you have more
then one behavior that uses the same property name?)
Instead of writing the script in a behavior cast member, you can use a
parent script with a "new" handler:
on new me, prop1, prop2
pMyproperty = prop1
pAnotherProperty = prop2
end
And then birth an instance of the parent script, passing the parameters and
attach it to the sprite (a lot like Pranav's code):
sprite(i).scriptInstanceList.add(script ("Behavior Parent
Script").new(prop1, prop2))
Your sprite should now have the properties initialized.
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!]