Chapter 5. Getting Started with Coding
With an understanding of the mechanics of programming with ActionScript, it is time to apply some structure to that knowledge. Part of developing programming skills is to learn some larger constructs that help you move from the realm of a coder to the realm of a developer. Even if you are learning ActionScript purely as a personal hobby, you will benefit from these constructs.
This chapter begins by presenting a primer on object-oriented programming (OOP) principles. You learn some of the key object-oriented terminology and why the principles behind object-oriented programming are important. Then the bulk of the chapter teaches you about some programming best practices, and finally you learn some techniques for creating your own functions. You've got a lot ahead of you, so let's get started.
Introduction to Object-Oriented Programming
The concept of object-oriented programming is core to how many modern programming and scripting languages operate. By learning about OOP principles, you'll have a better understanding of why ActionScript works the way it does, and if you decide to proceed to making your own custom classes, the knowledge will help you to better grasp that process, too.
Defining Object-Oriented Programming
Numerous definitions of object-oriented programming exist, and there can be many debates about some of the finer details, but the basic premise boils down to the concept of an object, which is
Note
A single entity that holds data and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access