Paul Steven wrote:
> 
> Paul, check if you didn't forget the "me" on your sprite's handler, that
> could be your answer.
> 
> Nope - I didn't forget the me
> 
> Here is the exact handler I have
> 
> --------------------------------------------------------------
> on Change_Sprite_To_Appropriate_Note_Member me
> 
>   case pInstrument_Icon_Number of
> 
>     1: sprite(me.spriteNum).member="Instrument1_Note"
> 
>     2: sprite(me.spriteNum).member="Instrument2_Note"
> 
>     3: sprite(me.spriteNum).member="Instrument3_Note"
> 
>     4: sprite(me.spriteNum).member="Instrument4_Note"
> 
>   end case
> 
> end Change_Sprite_To_Appropriate_Note_Member
> --------------------------------------------------------------
> 
> Even though it works fine now replacing me.spriteNum with the
> currentSpriteNum, I am still curious as to why it doesn't work with
> me.spriteNum!

Getting back to the original question:

If you are dropping the behaviours on the sprites on the stage by hand
or assigning them in the score, they'll know their own spriteNum. But if
you're assigning them on the fly with Lingo they won't, you'll need to
do it with something like:

add(sprite(x).scriptinstanceList, new(script "foo"),x)

And it'll have to have the property 'spriteNum' declared and set
explicitly in the 'new' handler

property spriteNum

on new me, x
  spriteNum = x
  return me
end


Have I struck close to the problem?

-- 
Carl West    [EMAIL PROTECTED]
617.262.8830 x246    

I have no superfluous leisure; my stay must be
stolen out of other affairs; but I will attend you awhile.

           - Isabella, Measure for Measure, Act 3 Scene 1

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

Reply via email to