<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ public function showInput():void { var myInt:int = parseInt(input.text); var myFloat:Number = parseFloat(input.text); var myNumber:Number = new Number(input.text); // use the toString() method to convert from a number to a string mx.controls.Alert.show("Integer: " + myInt.toString() + "; Float: " + myFloat.toString() + "; Number: " + myNumber.toString()); } ]]> </mx:Script> <mx:TextInput id="input" x="10" y="10" width="78"/> <mx:Button x="96" y="10" label="Show Number" click="showInput();"/> </mx:Application>