You need to create a Flex Library project. This type of
project's result is SWC file whereas a Flex application project's
result is SWF.
So let's say your formatter is in the package
my.library.formatter and it is called ZeroFormatter. So it will be
in the folder my/library/formatter. With that folder in your Flex
project you'll find a SWC in your project's bin directory.
Now you can use that in any other project. In other Flex
application project, edit the Project Properties and select the
Build path and select the Libraries tab. Pick Add SWC and browse to
the SWC you just made and pick the Add button.
Now you use import my.library.formatter.ZeroFormatter and use
the ZeroFormatter class.