Flash MX 2004 Object-Oriented Programming
Duration 2 days
Objectives This course introduces you to key concepts of object-oriented programming - encapsulation, polymorphism and inheritance - and shows you how to build classes and objects within the Flash MX Actionscript environment. At the end of the course you will be able to plan projects using sound object-oriented programming techniques and then implement them within Flash MX.
Requirements Good working knowledge of the Flash MX environment and workspace; ability to animate with the timeline and use symbols, buttons, text and movie clips within Flash; entry-level knowledge of Actionscript, or programming knowledge in any other modern programming language.
Course Outline
Object Orientated Programming Overview • What is OOP • Why it is important • Advantages over Procedural Code • Disadvantages over Procedural Code
OOP concepts and Building Blocks • Encapsulation • Inheritance • Polymorphism • Classes • Methods • Properties
Configuring Flash for OOP • Creating a Project Folder • Creating a Flash Project Template
Planning OOP projects • Why you need to plan • Paper-based planning • Planning an Encapsulation model • Planning for Inheritance
Encapsulation • Creating a new project file • Setting up layers in Flash • Creating an Event Handler • Using the event Handler to animate • Using properties to ehance the code • Using functions to manage the code
Classes and Prototypes • What are classes? • What are prototypes? • Using constructors to build classes • About anonymous functions • Building and testing a class • Including external code in Flash • Documenting your class
Inheritance • Classes in a hierarchy • Inheritance in Flash • Extending classes safely • Behaviours • Parent and child concepts • Overriding parent classes • Building and testing inherited classes
|