Copy link to clipboard
Copied
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?
1 Correct answer
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() .
Copy link to clipboard
Copied
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() .
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
@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:
