Useing the following script from: http://www.quirksmode.org/js/flash.html
Test on my server: http://www.simplethoughtproductions.com/wp-content/uploads/Other/josh/hd_test/video_test.html
I am trying to see if they have flash 9 or higher to display h264 movies and if not, tell them to update! The script seems to be working fine on both Windows and Macs but I am not sure how to do the final bit of getting the code to be rendered out properly in the document.write and if I am doing the if statement correctly. I have a feeling it is because the script for the video has its own "" and ); which need to be written properly for it to render but I am not sure how to do that. Any help is appreciated.
<SCRIPT LANGUAGE="Javascript">
<!--
var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
x = navigator.plugins["Shockwave Flash"];
if (x)
{
flashinstalled = 2;
if (x.description)
{
y = x.description;
flashversion = y.charAt(y.indexOf('.')-1);
}
}
else
flashinstalled = 1;
if (navigator.plugins["Shockwave Flash 2.0"])
{
flashinstalled = 2;
flashversion = 2;
}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
x = navigator.mimeTypes['application/x-shockwave-flash'];
if (x && x.enabledPlugin)
flashinstalled = 2;
else
flashinstalled = 1;
}
else
MSDetect = "true";
// -->
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
on error resume next
If MSDetect = "true" Then
For i = 2 to 6
If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then
Else
flashinstalled = 2
flashversion = i
End If
Next
End If
If flashinstalled = 0 Then
flashinstalled = 1
End If
</SCRIPT>
<script language="javascript" type="text/javascript">
<!--
if (flashinstalled == 2)
{
if (flashversion >= 9)
document.write("You have Flash version " + flashversion + " installed.");
else
document.write("You have Flash installed, but it is not new enough.");
}
else if (flashinstalled == 1) document.write("You don't have Flash installed.");
else document.write("I can't find out if you have Flash installed.");
// -->
</script>
Found an online converter that converts the HTML to JS so it now works :)
http://www.accessify.com/tools-and-wizards/developer-tools/html-javascript-convertor/default.php
Only issue i have now is that Thick box no longer works with the video in the script and I am not sure why but for most people this solution seems to work just fine... Plus I think IE 7 does not run the script the same as IE 6. Additional testing is needed though :)