Tuesday 5th April, 2011
9:00am to 5:00pm
This workshop will teach you object oriented programming in AS3 from the ground up. You'll learn how to reuse code efficiently, work well as a member of a team, and make use of many existing OOP libraries to speed up development of web, desktop, and mobile applications.
Beginners will love the introductory session that will help get you started quickly. We'll begin by learning the differences between classes and objects and writing simple examples of document/application classes and linkage classes. Then expand the functionality of those classes by adding methods and properties. Ultimately, we'll walk through a project taking it from timeline-based procedural code to a multi-class OOP format, providing a how-to for future class development.
AS2 users will enjoy a look at techniques to bring your code over to AS3 OOP syntax, and how the two languages behave differently. This will help you migrate quicker and more efficiently to AS3 and help you make one of the toughest migration decisions--when to port to the new language, and when to start over.
Best practices will be discussed, and we'll cover key OOP principles including how and when to use inheritance and composition, how to control access to your classes with encapsulation--including parameters, public methods, public properties and getters and setters--and how to promote flexibility and reuse through polymorphism.
Intermediate users will benefit from a close look at how to use interfaces to enforce class methods, how to instantiate classes from strings, and how to take best use data types and error checking--including how to type an object to a class, superclass, and interface.
More experienced uses will enjoy the later session in which we’ll focus on scope and communication between classes, dispatching events through the display list, and accessing the stage and other objects from a class--including a discussion on layers of abstraction. We’ll put this into practice by creating a custom event class that can send data along with the event.
Throughout the day, you will develop a simple particle system, sound visualizer, and microorganism. At the end of the workshop, you’ll have an opportunity to add your organism to a virtual petri dish and see it live among the organisms of your fellow students. It will be lots of fun and, if time is short, snippets and partial code libraries will be available to help.
Extensive source code will be distributed.
Sign in to add slides, notes or videos to this session