• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 12. Managing Variables, Data, an... > Flash at Work: Version Detection

Flash at Work: Version Detection

The variable $version, introduced in version 4.0r11 of Flash, can be accessed programmatically, in addition to being displayed using Cmd-Option-V (Mac) or Ctrl+Alt+V (Windows) (in the authoring environment, while the program is running). The $version variable cannot be used to determine whether a Flash Player is present because it can be used only from within an already-executing Flash program. JavaScript in the HTML page is the standard way to check whether the Flash Player is present. However, the $version variable has its own advantages: For instance, it works in browsers that don’t support scripting or that have scripting disabled.

Flash 5 introduced a new function, getVersion(), that evaluates $version and returns the result. But, of course, if you want to be able to detect the Flash 4 Player, you must use something that works in Flash 4.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint