The default controls don't do masked input, but some third-party controls
There is some formatting support in StringFormatter and StringUtil
I found StingUtil static class and even DateFormatter but for life of me I can not find StringFormatter anywhere or rather what the import statement should look like. With all the bells and whistles in FlashBuilder - how come it does so poorly the most basic of things - like finding standard Adobe classes ?!?
Even tried googling AS3 and/or Flex StingFormatter and all sorts of junk comes up but nothing that show use of this class !
Maybe somebody can go here and try and find it ;))))))))))))
I am really, seriously starting to loose my patience with adobe products because the toughest parts they have done ohhh so well - extremely well ... and then they totally mess it up on little **** details like this - nevertheless details which are the beef - without which all that other sizzle is pretty much useless ... as useless as StringFormatter is to me right now - since I can not do the simplest damn thing with it and that is to find it !!!!!!!!!!!!!!!!!!!!!!!
All formatters are in the mx.formatters package.
Adobe Flex SDK Team
I have the ADOBE FLEX 4 Framework posters sitting in front of my face and I do not see a StringFormatter class.
I also opened the PDF version and searched for "StringFormatter" and did not find it.
Maybe its another top secret FLEX hidden feature I really doubt that though.
Now I am curious if StringFormatter even exists in the FLEX Framework???
I see StringUtil, StringValidator on the framework poster.
Digging into source code, I see StringTools, which is poorly documented.
Not seeing a StringFormatter though
Ahhh. you need:
mx.formatters.StringFormatter does exist, but it turns out to be an intentionally undocumented and un-codehinted class. A comment on the class declaration says "This class is used internally by other formatters, and is typically not used directly."
The type of numeric formatting that VirtualCoder was looking for is similar to what NumberFormatter does, and this IS a documented and code-hinted class. However, it doesn't offer as many formatting options as VirtualCoder expects.
Although Flex's formatting capabilities are pretty basic, providing better ones hasn't been high on Flex developers' lists of improvement requests. I'm not sure whether that means that most developers get along OK with the basic support, write their own sophisticated subclasses of Formatter, or use some 3rd-party ActionScript formatting library.
Adobe Flex SDK Team