Adding version numbers

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

static var version:String = "1.0.0.42";
Note: Flex does not use or interpret the value of the version property.

If you create many components as part of a component package, you can include the version number in an external file. That way, 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 previous variable declaration, as the following example shows:

static var version:String = "1.0.0.42";