Nedenunder er et flashdetection-script jeg fandt på eksperten (
http://www.eksperten.dk/spm/31071 ), som også checker versionen...
<html>
<head>
<title>Flash detection version 3, 4 & 5</title>
</head>
<body>
<script language="javascript">
var version;
function goIE_flash(which){
version = which;
}
if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") != -1)
version = 0;
if(navigator.appName == "Netscape" && parseInt(navigator.appVersion)>3){
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if(plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 5)
version = 5;
else if(plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 4)
version = 4;
else if(plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 3)
version = 3;
else
version = 0;
}
</script>
<script language="vbscript">
on error resume next
FlashInstalled3 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))
FlashInstalled4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))
FlashInstalled5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))
if (FlashInstalled5) then
call goIE_flash(5)
else if (FlashInstalled4) then
call goIE_flash(4)
else if (FlashInstalled3) then
call goIE_flash(3)
else
call goIE_flash(0)
end if
end if
end if
</script>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=766 HEIGHT=319>
<PARAM NAME=movie VALUE="index.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="index.swf" quality=high bgcolor=#FFFFFF WIDTH=766 HEIGHT=319 TYPE="application/x-shockwave-flash" PLUGINSPAGE="
http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>
</body>
</html>