
In object-oriented programming, developers often use the term "architecting an application." This analogy is not far off the mark. You can approach any project as if you are its architect, and use object-oriented principles as building blocks to structure your code. As you develop your application, you can think of your code modules as the blueprints that form the foundation of your applications. Just as you can use one blueprint repeatedly to build similar structures, you can repurpose your code as needed to achieve your desired functionality.
The concept of classes is at the heart of all object-oriented code development. If you're not already familiar with object-oriented programming (OOP), this article will get you started writing ActionScript 3.0 classes. Writing classes has never been easier than with ActionScript 3.0. Whether you are new to ActionScript altogether or are new to working with ActionScript 3.0, you'll find that writing classes allows you to create projects that are easier to manage and maintain.
The concepts covered in this article will help you begin writing more portable, reusable code and move beyond the world of procedural code and timeline functions in Flash.
To complete this tutorial, you will need to install the following software and files:
Peter Elst is a certified Flash instructor, Adobe Community Expert, and active member of the Adobe User Group Belgium. As a freelance Flash platform consultant, and a respected member of the online community, Peter has spoken at various international industry events and published his work in leading journals. Most recently Peter was the lead author of Object-Oriented ActionScript 3.0 (Friends of ED, 2007).