Given a flex application or module, you can specify a custom xml namespace as follows:
<mx:Module xmlns:mx='http://www.adobe.com/2006/mxml' xmlns:custom='custom.namespace.*'>
We can then refer to mxml components in the directory custom/namespace/ using the custom tag. For example, if I have the components Custom1 and Custom2 in the custom/namespace directory, I can refer to them like so:
<custom:Custom1/> <custom:Custom2/>
Is there a way to map multiple directories onto the same tag? That is, if I have components in a subdirectory of custom/namespace, like custom/namespace/sub with component SubCustom1, is there a way to modify the flex document so the custom tag can refer to SubCustom1?
Note that one workaround I found was to add a new tag for each directory (e.g. xmlns:custom.sub=’custom.namespace.sub.*’, and then:
<custom.sub:SubCustom1>
This solution seems like a kludge, though.
To create a custom namespace in flex you need to
1) Create a custom manifest file: e.g.
2) Add something similar to the following to your flex-compiler.xml file:
You can read a more detailed explanation here.
This question was also answered here.