Skip to content

Instantly share code, notes, and snippets.

@katopz
Created September 15, 2012 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katopz/3726277 to your computer and use it in GitHub Desktop.
Save katopz/3726277 to your computer and use it in GitHub Desktop.
[AIR] Viewing versionNumber in the Application
//@see http://renaun.com/blog/2011/03/tips-for-ios-air-development/
import flash.desktop.NativeApplication;
// I put this in a try/catch so it does break SWF desktop testing with non-AIR testing
try
{
var descriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
var ns:Namespace = descriptor.namespaceDeclarations()[0];
versionNumber = descriptor.ns::versionNumber;
} catch(error:Error) { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment