View comments | RSS feed

getVersion function

getVersion() : String

Returns a string containing Flash Player version and platform information. The getVersion function returns information only for Flash Player 5 or later versions of Flash Player.

Availability: ActionScript 1.0; Flash Player 5

Returns

String - A string containing Flash Player version and platform information.

Example

The following examples trace the version number of the Flash Player playing the SWF file:

var flashVersion:String = getVersion();
trace(flashVersion); // output: WIN 8,0,1,0
trace($version); // output: WIN 8,0,1,0
trace(System.capabilities.version); // output: WIN 8,0,1,0

The following string is returned by the getVersion function:

WIN 8,0,1,0

This returned string indicates that the platform is Microsoft Windows, and the version number of Flash Player is major version 8, minor version 1 (8.1).

See also

os (capabilities.os property), version (capabilities.version property)


Version 8

Comments


ClayHalliwell said on Jul 30, 2007 at 11:16 AM :
Be aware that, if your version-detection code first attempts to determine whether getVersion() itself exists, you can't simply do: "if (getVersion != undefined)", or basic variations thereof. For whatever reason, getVersion reports its type as "undefined" instead of "function".

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00001731.html