You use Flex Builder to create custom MXML components.
The New MXML Component dialog box appears:
Save the file in a folder in the current project folder or in the source path of the current project if you want the component to appear in the Components view.
The filename defines the component name. For example, if you name the file LoginBox.mxml, the component is named LoginBox.
Custom components are typically derived from existing components. Containers are commonly used as the base components of layout custom components.
You can set these options to a fixed width and height or to percentages, or you can clear them. When you create an instance of the component, you can override the component's width and height in the instance.
If you set a percentage width and height or if you set no width and height, you can preview how the component will look at different sizes using the Design Area pop-up menu in the toolbar of the MXML editor's toolbar in Design mode. For more information, see Designing components visually.
Flex Builder saves the file in the parent folder and opens it in the editor.
If you saved the file in the current project or in the source path of the current project, Flex Builder also displays the component in the Components view so that you can rapidly insert it in your applications. For more information, see Add components in MXML Design mode.
For more information, see Simple MXML Components in Creating and Extending Adobe Flex 3 Components.