
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
283
Chapter 11
CHAPTER 11
An OOP Application Framework
Flash is notoriously open-ended. If there are several of ways to skin a cat, there are
even more ways to build a Flash application. Flash’s flexibility can cause confusion
for developers, especially when they’re building their first application. This chapter’s
goal is to overcome that confusion by providing one explicit example of how to
structure an OOP Flash application. By no means is the example presented here the
only way to create a Flash application, but it is certainly a legitimate, reusable
approach that makes a good foundation for any OOP project. We’ll consider the
example in the abstract sense first, not in reference to any particular application. Our
framework could be applied to anything from an email application to a video game.
In the next chapter, we’ll see how to apply our generic framework to a real-world sit-
uation—a currency conversion application.
The application framework described in this chapter derives from a Java mentality
more than, say, a Microsoft Visual Basic style. That is, our application will be a pure
OOP application, in which everything happens in classes and the .fla file is used only
to load classes and provide component linkage. Not every application in Flash needs
to be pure OOP. Flash also