12.10 Further Topics

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 12.  Objects and Classes

The scope of this book precludes an in-depth discussion of the following topics. You are encouraged to pursue them using the external sources listed.

12.10.1 Custom Events

You may have noticed that you have learned how to create methods and properties, but not event handlers or listener events. ActionScript does not provide a documented means of defining custom events for a class. However, the undocumented ASBroadcaster provides internal support for custom events. For details, see:

http://chattyfig.figleaf.com/flashcoders-wiki/index.php?AsBroadcaster

Branden Hall has also developed a custom event engine known as FLEM. See:

http://chattyfig.figleaf.com/flem/
http://chattyfig.figleaf.com/flem/extend.php

12.10.2 Design Patterns and UML

Once you've learned the syntax and methodology of object-oriented programming, you'll eventually realize that the challenging part is not the technical implementation but the design of the classes used to represent any given application. In the OOP world, consistent designs for similar problems have arisen and been dubbed "design patterns." Though there is little design pattern documentation available that specifically addresses ActionScript, design patterns are intended to be applied to any OOP-based language. For the adventurous ActionScripter willing to learn a little Java and/or C++, the following books are recommended:

Design Patterns Explained: A New Perspective on Object-Oriented Design, Shalloway and Trott, Addison Wesley, 2001.
Design Patterns: Elements of Reusable Object-Oriented Software, Gamma et al, Addison Wesley, 1995.

Typically, design patterns are charted with a special diagram language known as UML (Unified Modeling Language). UML is a standard for depicting class hierarchies visually. For information, see:

http://www.omg.org/gettingstarted/what_is_uml.htm
http://www.devx.com/uml/
UML Distilled: A Brief Guide to the Standard Object Modeling Language, Fowler and Scott, Addison Wesley, 1999.
     



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net