Versioning

When releasing components, you should define a version number. This lets developers know whether they should upgrade, and helps with technical support issues. When setting a component's version number, use the static variable version, as the following example shows:

static var version:String = "1.0.0.42";

If you create many components as part of a component package, you can include the version number in an external file. Thus, you update the version number in only one place. For example, the following code imports the contents of an external file that stores the version number in one place:

#include "../myPackage/ComponentVersion.as"

The contents of the ComponentVersion.as file are identical to the above variable declaration, as the following example shows:

static var version:String = "1.0.0.42";