Format a phone number using TextInput control
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:PhoneFormatter id="phoneDisplay" areaCode="415" formatString="###-####" /> <mx:Label text="Enter 7 digit phone number (########):" /> <mx:TextInput id="myTI" /> <mx:TextArea text="{phoneDisplay.format(myTI.text)}" /> </mx:Application>