Chapter 31. Distributing a Class Library

This chapter discusses three specific techniques for sharing a group of classes (a class library) among multiple projects and multiple developers. By far the easiest way to share classes is to simply distribute the source code. We’ll cover this easiest case first, before we discuss how to share classes without distributing source code, as you might want to do when selling a professional class library.

Tip

The term “class library” is programmer jargon for an arbitrary group of classes distributed to a team or to the world at large. Don’t confuse it with a .fla file’s Library or the Flash Library panel. Those terms are unique to the Flash authoring environment and not part of the current discussion.

In ActionScript, a class library can be distributed to other developers simply as a bunch of source .as files, in a .swf file, or in a .swc file. We’ll cover all three approaches in this chapter. Note, however, that ActionScript offers a wide range of options for distributing class libraries; this chapter covers three specific canonical situations but is not exhaustive. For more information on distributing class libraries, see the following Adobe documentation:

Get Essential ActionScript 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.