At 3:25 PM -0400 6/22/01, Carl West wrote:
>Irv Kalb wrote:
>>
>> Others have already pointed out the need for the "me" variable. But
>> I'll add something else. If you have a behavior where to want to
>> send something to the same sprite number, instead of hard coding the
>> sprite number, use the built in "spriteNum" variable. For example,
>> instead of:
>>
>> sendSprite(3, #checkRight, 15)
>>
>> use
>>
>> sendSprite(spriteNum, #checkRight, 15)
>>
>> And be sure to declare "property spriteNum" as the top of the script.
>> This makes the behavior much more general. You could use it in any
>> channel, and it will continue to work if you move your sprite from
>> channel 3 to some other channel.
>>
>> Irv
>
>This works when the behaviour is applied to the sprite during authoring,
>and it's a wonderful thing.
>But, if you apply the behaviour on the fly with Lingo, 'spriteNum'
>doesn't get a value. You'll need to set the property explicitly.
>
Carl is absolutely right here. Thanks for the reminder.
Irv
--
Lingo / Director / Shockwave development for all occasions.
(Home-made Lingo cooked up fresh every day just for you.)
[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!]