My experience with the FileSystem  controls is the result of many hours spent building a media library application.  In this tutorial,  I am going to elaborate on the process I went through to streamline the performance of my application while searching large directories for media files.  The process of searching through directories can be very time consuming and likely to lock up the application for some time.  By the time you are finished reading this tutorial you will have a good understanding of the Events model in flex and know how to use a number of built in flex components asynchronously resulting in better performance and GUI design.

First let me define the task.  I wanted to create a mechanism to allow users to search multiple directories for media files.  Media files include Video,  Picture or Audio files.  Once the files are collected, they are to be added to an XML file so the file meta data is saved for later use.  If XML means nothing to you then head on over to to get a great tutorial.  I personally have learned a lot from that site over the years.  Since we will be working with files located on the local computer it is important to note that the components that will be used are only supported inside AIR applications running on the local computer and will not work in SWF files viewed in a user's browser.

The focus of this tutorial is to gain an understanding of how asynchronous functions work and how program control is handled throughout.  I decided to use directory searching as the task since it is what I did in my last project.  You could easily replace directory searching with any other goal, once you understand how asynchronous function work.  Please download the code so you will have it while reading the tutorial from here