John Lodge wrote:
> I want my user to input information into several editable sprites
> consecutively. After entering data into the first sprite I want them to be
> able to press "ENTER" and then for the focus to shift to the next sprite.
> How might I tackle this? i.e.
>
> 1. Display several editable sprites
> 2. User enters information into first sprite
> 3. User presses Enter key
> 5. Focus switches to second editable sprite.
> 6. Process continues as above ...

you need to look at the keyboardFocusSprite
and use something along the lines of:

-- ensure the handler includes me eg. on checkReturn me or this will not
work
-- check if the return key has been pressed
if the key = RETURN then
-- check if the next sprite is editable
   if sprite(me.spriteNum +1).editable = true then
-- if it is then set the keyboard input to that sprite
    the keyboardFocusSprite = sprite(me.spriteNum +1)
else
--if it's not editable then do nothing or
-- the keyboardFocusSprite = sprite(the first editable sprite)
-- to cause it to loop back around
nothing
end if
end if

HTH
Brad



[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