Searchable Flash ActionScript Code Library
One of the things that I used to use a lot, and that I wish was part of the Flash authoring environment, is the code Snippets feature that’s available in Dreamweaver. Code Snippets is a feature that allows you to name and save snippets of HTML, javascript, or anyother type of code, to a central library so that it can be re used at a later time ( Clicking on a Snippet will insert the code into the page ). Aside from saving a lot of time, it makes it easy to share code with others, as snippets can be imported into Dreamweaver.
Now that I spend more of my time programming in Flash, I wish there was a code snippet library for saving actionscript. This would allow me to build a library of the common functions and classes I use over and over: an XML load and parse snippet, a NetConnection snippet, one for mic and cam settings – shared objects – sound objects – component styles etc,.
Since that day hasn’t come, I decided to build a simple database to serve the puropse.
![]()
(click image for larger view)
The database is very basic, but allows me to:
- paste code into a text field
- provide a description of the code
- add URL to the project (if relevant),
- add info related to the author of the code (if from a book or online community)
- add the date
- include the path to the file (if there is one)
- select a checkbox to help identify the code as being for Flash or Flash Server projects
- and best of all, search for and retrieve the code so that I can reuse it in other projects
The nice thing about having code in a datbase is that it will allow me to organize code centrally. This will keep me from having to search through flash projects to find that bit of code I need, or to type it – again – from scratch. I figure I’ll put the database on my thumb drive so that I can access it at work and at home.
Better idea? While I was developing the database it dawned on me that an action script wiki might be a lot more valuable. A wiki would allow the world wide flash developer community to share code and best practices for Flash and Flash server. Maybe Adobe should consider hosting something like this. Currently they have a wiki for AS 3 development, and to some extent their online integrated help system is “wiki like” in that it provides good code examples that users can comment and add their own code to, but a wiki may get more input from the community at large?

Excellent ideas here, have emailed my mum so expect a big reply!!