A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Using TextInput boxes to change to small Caps lettering with NO ....

  1. #1
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    117

    Using TextInput boxes to change to small Caps lettering with NO ....

    Using two TextInput boxes (fName and lName) which are writting 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

  2. #2
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    117
    I did get a reply and maybe somebody will be interested: The answer came from a person with the name 'Masamune' Thanks a lot!
    Code:
    <?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>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center