Home Tutorial Flex Flex-components Using custom component in MXML

 
 

Share on Google+Share on Google+
Using custom component in MXML
Posted on: April 12, 2010 at 12:00 AM
Advertisement
When you create custom component for your application or you want to use third party components in your application, you need to indicate where they are in your application directory structure.

Using custom component in MXML

When you create custom component for your application or you want to use third party components in your application, you need to indicate where they are in your application directory structure. For this, you required to specify a namespace definition for the component to identify the directory location.

For example, If you create custom component MyCustomButton in mycomp package in the application root directory, you specify the namespace as given below. In this example, CompRI will be used to refer the components which are packaged in mycomp directory.

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
     
layout="
vertical"
     
xmlns:CompRI="
mycomp.*"> 

    <CompRI:MyCustomButton/>

</mx:Application>

Advertisement

Related Tags for Using custom component in MXML:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 12, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com