PDA

View Full Version : Using TextInput boxes to change to small Caps lettering with NO ....


aktell
12-24-2009, 11:14 PM
Using two TextInput boxes (fName and lName) which are writing at the same time over to a (fullName) Text box, BUT change the data in here automatically to 'small Caps' lettering with NO spaces.
I'm finding all sort of things but nothing close enough. Any help would be appreciated!
Thanks in advance aktell

aktell
12-25-2009, 01:35 AM
I did get a reply and maybe somebody will be interested: The answer came from a person with the name 'Masamune' Thanks a lot!

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
protected function name_changeHandler(event:Event):void {
var firstName:String = fName.text.toLowerCase();
var lastName:String = lName.text.toLowerCase();
fullName.text = firstName + lastName;
}
]]>
</mx:Script>
<mx:Label x="156" y="74" text="first"/>
<mx:TextInput x="199" y="72" id="fName" change="name_changeHandler(event)"/>
<mx:Label x="156" y="104" text="last"/>
<mx:TextInput x="199" y="102" id="lName" change="name_changeHandler(event)"/>
<mx:Text x="199" y="132" text="Text" id="fullName"/>
</mx:Application>