<mx:TextInput id="ti" restrict="[a-z][A-Z]" change="onChange(event)"/>

private function onChange(event:Event):void
{
if(ti.text.length > 0)
ti.restrict = "[0-9][a-z][A-Z]";
else
ti.restrict = "[a-z][A-Z]"
}
 i used above code for getting below o/p

name:am2233th ///i want this

name:12amutha /// not this

i have an another problem in the above code ... when i m entering the
number first its work very well... once i enter the number ,move the
cursor to the first position on the time i can enter the number...how
can i avoid this problem?

example:

1st enter in textbox: amu54tha

immediately move cursor to the 1st position

and the result is:01amu54tha

--

You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.


Reply via email to