2

In a Flex web application, you can print the version of the flash player that is being used by using:

var version:String = Capabilities.version

According to the docs, this should return the flash player or AIR runtime version, but it does not in my testing. I keep getting the flash player version when running in AIR.

Is there a way to get the AIR version? I am running on AIR 3.2

(I want to display the AIR runtime version in the about box of my application for troubleshooting purpose)

Wim Deblauwe
  • 25,113
  • 20
  • 133
  • 211

1 Answers1

2

Will this work for you?

To quote:

The NativeApplication object has a runtimeVersion property, which is the version of the runtime in which the application is running (a string, such as "1.0.5"). The NativeApplication object also has a runtimePatchLevel property, which is the patch level of the runtime (a number, such as 2960). The following code uses these properties:

air.trace(air.NativeApplication.nativeApplication.runtimeVersion); air.trace(air.NativeApplication.nativeApplication.runtimePatchLevel);

JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
  • My about window is in common code between the web version and the air version of my app and does not have direct access to `NativeApplication`, but I worked around it as follows: if(org.springextensions.actionscript.util.Environment.isAIR) { var version:String = ClassUtils.forName( "flash.desktop.NativeApplication" )["nativeApplication"]["runtimeVersion"]; } – Wim Deblauwe Jun 06 '12 at 11:49