Martin Bedard wrote
> i just want to know how can i limit a text field entry to six char on
> a KeyDown script ?
>
> i want to block the number of char in my text fiels to 6 and alert a
> message if it over !
>
> the field is "empty" on a startmovie and user must enter his personel
> number to access more.
Add a behaviour like this to your text or field sprite
------------
property myMember
on beginSprite me
myMember = sprite(me.spriteNum).member
myMember.editable = 1
myMember.text = EMPTY
end
on keyDown me
keyEntered = the key
if (keyEntered = RETURN) or (keyEntered = ENTER) then
-- accept the input
else if myMember.text.length >= 6 then
-- too many characters
alert ("Comment dit-on ca en... um, err... parlez-vous Strayn?")
else
-- let the field handle the key
pass
end if
end
------------
Luke
--
__________________________________________________________________________
Mecca Medialight Pty Ltd
Mecca Medialight: Medialight Sound Studio:
111 Moor Street 1 Bakehouse Lane
Fitzroy, Vic. 3065 North Fitzroy, Vic. 3068
Tel +613 9416 2033 Tel +613 9416 2033
Fax +613 9416 2055 Fax +613 9416 2055
http://www.medialight.com.au
__________________________________________________________________________
[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!]