Adding Version Numbers - Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual

Creating and extending flex 2 components
Hide thumbs Also See for FLEX 2 - CREATING AND EXTENDING COMPONENTS:
Table of Contents

Advertisement

When you create a component, you can include ActionScript that enables the component and
a screen reader for audio communication. When developers use your component to build an
application in Flash, they use the Accessibility panel to configure each component instance.
Flash includes the following accessibility features:
Custom focus navigation
Custom keyboard shortcuts
Screen-based documents and the screen authoring environment
An Accessibility class
To enable accessibility in your component, add the following line to your component's class
file:
mx.accessibility.ComponentName.enableAccessibility();
For example, the following line enables accessibility for the MyButton component:
mx.accessibility.MyButton.enableAccessibility();
For additional information about accessibility, see Chapter 36, "Creating Accessible
Applications," in Flex 2 Developer's Guide.

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
static var version:String = "1.0.0.42";
Flex does not use or interpret the value of the
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";
, as the following example shows:
version
property.
version

Adding version numbers

171

Advertisement

Table of Contents
loading

Table of Contents