Chapter 4. Classes

 <  Day Day Up  >  

This chapter covers the syntax and theory behind classes in ActionScript 2.0 and assumes a prior basic understanding of the concepts discussed in Chapter 2. Classes are the foundational structure of all object-oriented programs, making them arguably the most important aspect of OOP. As such, classes are predictably intricate . This chapter is correspondingly lengthy and detailed but, even so, newer programmers can use it to learn the basics of creating and using classes.

If this is your first real exposure to programming with classes, you may want to concentrate on the first few pages of each of the following sections:

  • "Defining Classes"

  • "Constructor Functions (Take 1)"

  • "Properties"

  • "Methods"

  • "Completing the Box Class"

Then you can dive right into Chapter 5, which shows, step-by-step, how to create a real-world class in the Flash authoring environment. We'll address the big-picture questions in Chapter 5. (I decided to cover the syntax and mechanics first so you'd have a strong foundation moving forward.)

Just remember to return to the present chapter whenever you need detailed reference material on implementing and using classes in ActionScript 2.0.

 <  Day Day Up  >  


Essential ActionScript 2.0
Essential ActionScript 2.0
ISBN: 0596006527
EAN: 2147483647
Year: 2004
Pages: 177
Authors: Colin Moock

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net