1 Reply Latest reply on Sep 21, 2007 9:22 AM by Menace4258

    Flex text input text

    justinc9112
      Okay so i have 10 buttons equaling a phone, and I have 10 text input boxes with pre set text like 0,1,2 etc.. to match what the button numbers are. Kind of like a security pad. I also have a textinput that stores this text from one of the corresponding button/input presses. But I want it to show each press in the main textinput box, not just replace with each one each press of another button.

      It's like a security panel type login. Code is below any help would be appreciated. Thanks.

      Code:

      <?xml version="1.0"?>

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">

      <mx:Panel width="314" height="75%"
      paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10" horizontalAlign="center" verticalAlign="middle">
      <mx:TextInput id="myInput"
      width="253"
      text=""/>


      <mx:Tile direction="horizontal" borderStyle="inset"
      horizontalGap="10" verticalGap="15"
      paddingLeft="10" paddingTop="10" paddingBottom="10" paddingRight="10">

      <!--buttons-->
      <mx:Button height="49" width="50"
      label="0" id="button0"
      click="myInput.text = myText0.text;"/>
      <mx:Button height="49" width="50"
      label="1" id="button1"
      click="myInput.text = myText1.text;"/>
      <mx:Button height="49" width="50"
      label="2" id="button2"
      click="myInput.text = myText2.text;"/>
      <mx:Button height="49" width="50"
      label="3" id="button3"
      click="myInput.text = myText3.text;"/>
      <mx:Button height="49" width="50"
      label="4" id="button4"
      click="myInput.text = myText4.text;"/>
      <mx:Button height="49" width="50"
      label="5" id="button5"
      click="myInput.text = myText5.text;"/>
      <mx:Button height="49" width="50"
      label="6" id="button6"
      click="myInput.text = myText6.text;"/>
      <mx:Button height="49" width="50"
      label="7" id="button7"
      click="myInput.text = myText7.text;"/>
      <mx:Button height="49" width="50"
      label="8" id="button8"
      click="myInput.text = myText8.text;"/>
      <mx:Button height="49" width="50"
      label="9" id="button9"
      click="myInput.text = myText9.text;"/>

      </mx:Tile>

      </mx:Panel>

      <!--Shows numbers of buttons clicked in textinput-->

      <!--Button clicked then pre set text goes into myinput textinput-->
      <mx:TextInput visible="false" id="myText0"
      width="150"
      text="0" enabled="false"/>
      <mx:TextInput visible="false" id="myText1"
      width="150"
      text="1" enabled="false"/>
      <mx:TextInput visible="false" id="myText2"
      width="150"
      text="2" enabled="false"/>
      <mx:TextInput visible="false" id="myText3"
      width="150"
      text="3" enabled="false"/>
      <mx:TextInput visible="false" id="myText4"
      width="150"
      text="4" enabled="false"/>
      <mx:TextInput visible="false" id="myText5"
      width="150"
      text="5" enabled="false"/>
      <mx:TextInput visible="false" id="myText6"
      width="150"
      text="6" enabled="false"/>
      <mx:TextInput visible="false" id="myText7"
      width="150"
      text="7" enabled="false"/>
      <mx:TextInput visible="false" id="myText8"
      width="150"
      text="8" enabled="false"/>
      <mx:TextInput visible="false" id="myText9"
      width="150"
      text="9" enabled="false"/>

      </mx:Application>