8. What is a Class?
As your projects become more complex, having all your code in a frame script will become cumbersome and difficult to maintain. You need a way to structure your code and link code to the objects themselves. You need classes. The term for using classes to structure your code is object-oriented programming.
ActionScript allows you to define the classes, or building blocks, of applications, and give them specific actions and functionality. Let’s start by exploring how classes work and dive deeper into the topic of variables. From there we’ll discuss how classes are created and how to add functionality to them using methods. Finally, you’ll learn how to formalize your class structures, making them easier to use and debug.
Overview ...
Get Fundamentals of ActionScript 3.0: Develop and Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.