header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
James
Points:0
Posts:0

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?



1
Rex
Points: 1280
Posts:0
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;

2
James
Points: 0
Posts:0
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.

3
Rex
Points: 1280
Posts:0
11/3/2011 10:33:14 AM



sorry James it should be

var versionNo:String = descriptor.nameSp::version;


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 8+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions