Skip to main content
Captain Rhubarb
Participant
July 14, 2015
Answered

How to detect Flash build version in Javascript before Flash is activated?

  • July 14, 2015
  • 3 replies
  • 3443 views

Flash player versions are in the format:  Major.Minor.Release.Build

Many sites use the SWFObject javascript library to detect installed Flash player version.

The SWFObject tool is only able to detect the Major.Minor.Release version numbers of the installed player.

It is not able to distinguish the Build number.


Recent security patches are only incrementing the Build number, so it is not possible to ensure that the user has a safe installed version.

The SWFObject detection occurs BEFORE the FireFox browser version detection, so we could display a more friendly "Please update your Flash" message to users.


How to detect Flash build version in Javascript before Flash is activated?
Or could Adobe be nice enough to increment the Release version when critical security patches are done?

This topic has been closed for replies.
Correct answer cosmin_mitroi

var a = navigator.plugins;

var dllfname;

if (0 < a.length) {

   for (var d = "", b = 0, g = a.length; b < g; b++) if (-1 != a[b].name.toLowerCase().indexOf("flash")) {

   dllfname = a[b].filename;

  }

}

$parts = dllfname.replace(".dll", "").split("_");

$buildnumber = parseInt($parts[4]);

This will get the build number from the dll filename string and can be concatenated with Major.Minor.Release version numbers from swfobject.getFlashPlayerVersion() .

3 replies

Captain Rhubarb
Participant
July 15, 2015

@cosminj0429,

Thank you for your sample code.

Works great in FireFox, and you helped me realize that I needed to start searching for info on "plugins" rather than just flash.

Found this useful javascript library:

http://www.pinlady.net/PluginDetect/Flash/

Adobe Employee
July 15, 2015

18.0.0.209 is the latest build with security patches. Please check this by clicking on the Check Now button on Flash Player Help

cosmin_mitroi
cosmin_mitroiCorrect answer
Participant
July 15, 2015

var a = navigator.plugins;

var dllfname;

if (0 < a.length) {

   for (var d = "", b = 0, g = a.length; b < g; b++) if (-1 != a[b].name.toLowerCase().indexOf("flash")) {

   dllfname = a[b].filename;

  }

}

$parts = dllfname.replace(".dll", "").split("_");

$buildnumber = parseInt($parts[4]);

This will get the build number from the dll filename string and can be concatenated with Major.Minor.Release version numbers from swfobject.getFlashPlayerVersion() .