11/2/2011 10:10:03 PM
Title:
Get Version Number
I am wroking in Flex Builder 3 in an AIR application. I want to get the version number of my current application. How to get it?
11/2/2011 10:28:17 PM
to read version number of AIR application you can use the following code:
var AppDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
var nameSp:Namespace = descriptor.namespaceDeclarations()[0];
var versionNo:String = descriptor.ns::version;
11/2/2011 10:44:48 PM
I am getting this error on the second line.
Call to a possibly undefined method namespaceDeclarations through a reference with static type mx.core:UIComponentDescriptor.
Error in 3rd line
Access of undefined property ns.
11/3/2011 10:33:14 AM
sorry James it should be
var versionNo:String = descriptor.nameSp::version;