Using ZipCodeFormatter to format a 5+4 ZIP Code

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:XML id="myData">
<root>
<contacts>
<item name="AAA" zipcode="953763233" />
</contacts>
</root>
</mx:XML>
<mx:ZipCodeFormatter id="fmtZip" formatString="#####-####" />
<mx:Label text="Zip Code {fmtZip.format(myData.contacts.item.@zipcode)}" />
</mx:Application>
Related examples in the same category