Overview
This is an introduction to Object-Oriented Programming concepts in Flash. The benefits and implementations of OOP are explained. Topics such as inheritance, components, listener-based programming, and best practices are showcased in actual projects.
Explanation of OOP concepts
OOP in a prototype-based language
Differences between Flash 5 & Flash MX
- new OOP features in MX
- Components
- Creating a component in MX
Listener-based Programming
- Implementing listeners in Flash 5
- Built-in listeners in MX
Implementation Best Practices
- Separation of code and view (graphics)
- Different ways to implement inheritance
- problems in Flash 5 vs. problems in MX
- Listener-based OOP project
- Flash 5 implementation
- Flash MX implementation
- – Code Reuse
- – Logical
Suitable for large-scale applications development
Explanation of OOP concepts
- Class
- Instance
- Private vs. Public properties and methods
- Encapsulation
- Inheritance
- Polymorphism
- examples
OOP in a prototype-based language
- explanation of:
- prototype
- __proto__
- prototype chain
- class function
- constructor
- instance-based in Flash 5 vs. symbol-based in MX
Differences between Flash 5 & Flash MX
- new OOP features in MX
- Object.registerClass()
- – super()
- Components
- Creating a component in MX
- #initclip, #endinitclip
- load order
- component parameters
- Live Preview
- Custom UI
Listener-based Programming
- Implementing listeners in Flash 5
- Built-in listeners in MX
- Separation of code and view (graphics)
- Different ways to implement inheritance
- problems in Flash 5 vs. problems in MX
- constructor
- using super() with __proto__
- Listener-based OOP project
- Flash 5 implementation
- Flash MX implementation