Mega Code Archive

 
Categories / Flex / Components
 

Get value from NumericStepper and TextInput

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"     applicationComplete="fullNameTextInput.setFocus()">     <mx:Script>                  import mx.controls.Alert;         public function showInfo():void         {             Alert.show("Your name is " + fullNameTextInput.text + " and your age is " + ageNS.value);         }            </mx:Script>     <mx:Panel id="panel" x="10" y="10" width="250" height="200"         layout="vertical" title="title" paddingLeft="5">         <mx:Label text="My name is:" fontWeight="bold" />         <mx:TextInput id="fullNameTextInput" />         <mx:Label id="ageLabel" text="My age is:" fontWeight="bold" />         <mx:NumericStepper id="ageNS" maximum="120" minimum="18" />         <mx:CheckBox id="expertCheckBox" label="I'm a Flex Expert!" />         <mx:Button label="Click me" click="showInfo()" />     </mx:Panel> </mx:Application>