Introduction to Object-Oriented Programming–1 (Classes)
24 May, 2009 – 11:31Although “Object-Oriented Programming” combination of these words is scary for beginning programmers, but after beginning the OOP it turns out that all process is not so hard actually. I think the difficult part for beginner is always adaptation process. For making this process little easier I will make a short introduction to object-oriented programming. In this and the next few sections I will explain the basic terms and they part of work in object oriented programming.
Classes and Objects
Classes are code snippets which do simple tasks for us. To do a specific job, sometimes one, sometimes several different classes at the same time can be used. For using these classes we have to create an Object of a class.
For example, let say there is an image animation that you use in every project you’re working on, which is working with 40 lines of codes. Normally (when writing code in timeline), you have to copy and paste these 40 lines of code every time you want to use the animation. Rather than that you can write bit of more code and turn that animation code as a single ActionScript file. In this case has been developed a Class. You can use the animation of this class file in Timeline or in another Class structure. But whenever you use the Class file you have created you are actually creating and using Object. Which means an Object is instance of a class file.

