jump to navigation

Howto: Organise custom components in Flex? August 9, 2007

Posted by Mayank in flex.

Most of the material on custom components in flex talks about their creation and their use within flex applications. As the number of components begin to grow one begins to feel the need for organising them in subfolders.

To use a custom component in a Flex application we usually add an attribute to the mx:Application tag:


and then use the components as


I recently solved the mystery behind this attribute :). If you would like to organise the components into subfolders, then create a folder as desired and while setting the namespace attribute in the mx:Application tag set it like this:


To access the components you would use


You can create additional folders and include their namespaces too :).


To take this a step further, you could nest your folders to mimick the way your organise your java packages:

Create sub1, and then sub2 under sub1

To use components under sub1 you could place a namespace declaration like:


and then to include sub2 components you would declare another namespace:


Hope that helps you in organising your custom flex components.

Happy Flex-ing! 🙂



1. chowdary - May 28, 2009

i want adding custom components to action script.

suppose i created custom component name like modify.mxml.

I want add this component in action script.

Plz help me this. its very urgent.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: