Custom Flex Components:
In the Flex 3 development, User can create custom components using mxml or ActionScript. In this example user can see mxml custom component. The purpose to create custom components in the Flex application is easy to develop, reusability, maintainability. User create these components if application require these custom components. Custom components functionality of the Flex provide us for break up your code with in Flex application into sub parts of the application. We can create custom components in both mxml and Action Script. In this example we have create a button bar custom component. First we will create a custom component and after using namespace we will used it. The main purpose is to create custom components for your specific application requirements.
<mx:ButtonBarxmlns:mx="http://www.adobe.com/2006/mxml" borderStyle="solid" horizontalGap="5"> <mx:dataProvider> <mx:String>Submit</mx:String> <mx:String>Login</mx:String> <mx:String>Register</mx:String> </mx:dataProvider>
We have create a ButtonBar component and create a data provider for it after that we have create application using this component.
<mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml" xmlns:CustComp="custocumponent.*"> <CustComp:buttonbar/>
In the mainapplication.mxml, we have used buttonbar custom component with namespace prefix CustComp. The namespace prefix told you to look for the file that implements custom components and tag name corresponds to the file name of the components. In this example we have create a package that hold buttonbar.mxml custom component and mainapplication.mxml that define Flex application.
Action Script custom components
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.