The flash.system.Capabilities.version
gives you what you need ( the internal build number ) :
Specifies the Flash Player or Adobe® AIR® platform and version information. The format of the version number is: platform majorVersion,minorVersion,buildNumber,internalBuildNumber.
var internal_build_number:int = flash.system.Capabilities.version.split(',')[3];
// gives : 203, for flash player 18.0.0.203
EDIT :
To get the exact version of Flash Player using JavaScript, you can use an flash.external.ExternalInterface
(how to use it here) to send the information from Flash to JS.
For that, if you are an ActionScript programmer ( otherwise you can download the swf (1.24KB) from here ) so you can write something like this :
ActionScript 3 :
// fn : the name of the js function which will get the flash version
// this name is passed by flash vars
var fn:String = this.loaderInfo.parameters.fn || 'console.log',
// WIN 18,0,0,203 => [18,0,0,203]
version:Array = Capabilities.version.split(' ')[1].split(',');
if(ExternalInterface.available){
// call the js function and pass to it the flash player version
ExternalInterface.call(fn, version);
}
Then for the HTML part :
JS :
function echo(version){
// for : version = [18,0,0,203]
// gives : internal build number : 203
console.log('internal build number : ' + version[3]);
}
HTML :
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param name="movie" value="flash_to_js.swf" />
<param name="flashvars" value="fn=echo" />
<object type="application/x-shockwave-flash" data="flash_to_js.swf">
<param name="flashvars" value="fn=echo" />
</object>
</object>
Hope that can help.