Define the Project
I like to think of myself as a Flash/Flex specialist. While I am perfectly capable of tackling medium to large projects, I find myself constantly trying to perfect existing code to do more. Currently, I am working on a project to stream personal media to a variety of devices including user computers and ipods. I am open to writing about and discussing anything Flash/Flex in particular or anything else that may be troubling you.View all articles by Dov Goldberg
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 http://www.w3schools.com/xml/ 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