diff --git a/starling/src/starling/utils/SystemUtil.as b/starling/src/starling/utils/SystemUtil.as index 2d81e6488..37329832d 100644 --- a/starling/src/starling/utils/SystemUtil.as +++ b/starling/src/starling/utils/SystemUtil.as @@ -29,6 +29,7 @@ package starling.utils private static var sPlatform:String; private static var sDesktop:Boolean; private static var sVersion:String; + private static var sApplicationVersion:String; private static var sAIR:Boolean; private static var sEmbeddedFonts:Array = null; private static var sSupportsDepthAndStencil:Boolean = true; @@ -60,6 +61,7 @@ package starling.utils var ds:String = appDescriptor.ns::initialWindow.ns::depthAndStencil.toString().toLowerCase(); sSupportsDepthAndStencil = (ds == "true"); + sApplicationVersion = appDescriptor.ns::versionNumber; sAIR = true; } catch (e:Error) @@ -141,6 +143,13 @@ package starling.utils initialize(); return sVersion; } + + /** Returns the application version number setup in the *-app.xml. */ + public static function get applicationVersion():String + { + initialize(); + return sApplicationVersion; + } /** Returns the value of the 'initialWindow.depthAndStencil' node of the application * descriptor, if this in an AIR app; otherwise always true. */ @@ -194,4 +203,4 @@ package starling.utils return false; } } -} \ No newline at end of file +}