ActionScript for Flash MX: The Definitive Guide, Second Edition

ActionScript for Flash MX: The Definitive Guide, 2nd EditionBy Colin Moock
Chapter 18.  ActionScript Language Reference
getVersion( ) Global Function Flash 5

examine the platform and version of the Flash Player

getVersion()

Returns

A string containing version and platform information for the Flash Player hosting the current movie.

Description

The getVersion( ) function tells us the platform and Flash Player version being used to view a movie. It can be used to execute different code conditionally for specific versions of the Flash Player or on certain operating systems. As of Flash 6, the capabilities.version property is preferred over getVersion( ). However, for movies running in Flash Player 5, getVersion( ) must still be used. In Flash 4, the global $version property must be used.

See capabilities.version for sample code and a complete description of the possible return values of getVersion( ).

See Also

capabilities.version, $version; Appendix C

    Категории