yes.
you're trying to get the sprite number from the cast member name.
member("teamname, "team data") will return the memberNum.
then you're using that number as the sprite channel.
but that's not the sprite channel, that's the memberNum.

you can't get the sprite number from the cast member name.
one reason is that member("teamname, "team data") could very well be in
more than one sprite channel.

you need to find a better way of knowing what sprite you want to use.
either keep track of the sprites by hardcoding the sprites in question,
or create a sprite manager that knows which sprites are holding that
cast member, or something in between...

--bh

Alan Robinson wrote:
> 
> Hi
> I am trying to set the keyboardFocusSprite by reference to a field name
> using the following code:
>     set the keyboardFocusSprite =  sprite(member("teamname", "team
> data").spritenum
> The problem is it returns either the number of an empty sprite channel or
> the cast membernum. Can you tell me where I am going wrong.
> 
> [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!]

-- 
R. Bhakti Klein
Educational Software R & D
http://www.DLWorkshop.net
��
Baritone
���
"On Earth, you can only do little things;
but you can do them with a lot of Love."
                              -- Mother Theresa

[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