thanks veeru its working... On Dec 27, 1:22 pm, veeru k <[email protected]> wrote: > Try This: > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> > <mx:Script> > <![CDATA[ > import mx.managers.CursorManager; > import mx.controls.Alert; > > public var str:String; > public function onChange(event:Event):void > { > var rest:int=0; > str=t1.text; > for(var i=0;i<10;i++) > { > if(t1.text.substring(0,1)==i) > rest=1; > } > if(rest!=1) > { > t1.restrict="[0-9][a-z][A-Z]"; > } > else > { > t1.text=""; > t1.text=str.substring(1,str.length); > t1.restrict="[a-z][A-Z]"; > } > } > ]]> > </mx:Script> > <mx:Label x="41" y="130" text="Enter Text Here :" width="167" > height="26" fontFamily="Georgia" fontSize="15" fontWeight="bold"/> > <mx:TextInput x="192" y="130" height="25" width="190" id="t1" > change="onChange(event)"/> > </mx:Application> > > --- > Veeru > ITON Technologies
-- 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.

