Sharing custom components are a great way to keep from re-inventing the actionscripted wheel. Pulling these off of Flex Exchange, I had been really confused about why developers were nesting their .as files in folder after folder that seemed to be named in some kind of odd pattern. “Why can’t they just put it in the root folder!?” I guess it showed my inexperience because I finally have more of an understaning on the reason and it makes a lot of sense. I guess those professional programmers at Adobe really do know what they’re doing!
So, it’s essentially, reverse domain name notation so something from Adobe.com would be com.adobe… The folder structure would be the same. I found some links to descriptions of the convention, and why it’s done. Here’s a couple that explain it pretty well:
ActionScript 2.0 Best Practices -Great reference, not just for AS2! Under Naming Packages it talks about the classpath convention.
Once you understand classpaths, then you will know how to include custom components downloaded from the Flex Exchange or from other professional programmers. Here’s a link describing how to add the path for the custom classes.
I hope this explains it for people starting out that are as confused as I was before I understood it. It should get you looking professional, quicker.