This is a really good flash detect javascript.
To use the Flash detect script, you can download
flash_detect.zip which contains the two scripts you need and this example HTML page for your reference. You can also download individually the files
Dispatcher.js and
Dispatcher.vbs (for MSIE). You will need to do the following in your HTML page:
Insert in the <head> area the following JavaScript calls and code:
<script type="text/javascript" src="Dispatcher.js"></script>
<script language="VBScript" src="Dispatcher.vbs"></script>
<script language="JavaScript" type="text/javascript">
<!--
var doflash = false;
var player = new MM_FlashInfo();
if (player.installed) {
if (player.version && player.version >= 5) { // NEEDS FLASH VERSION 5 OR GREATER
doflash = true;
}
}
//-->
</script>
Then in the body area where you want to insert the Flash movie, use JavaScript document.write to write the appropriate html:
<script language="JavaScript" type="text/javascript">
if (doflash) {
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
document.write(" id='flashhome' width='597' height='215' align='' title='has flash'>");
document.write("<param name='movie' value='nathan.swf'><param name='play' value='true'>");
document.write("<param name='loop' value='false'><param name='quality' value='high'>");
document.write("<param name='menu' value='true'><param name='bgcolor' value='#333333'>");
document.write("<embed src='nathan.swf' play='true' loop='false' quality='high' menu='true' bgcolor='#333333'");
document.write(" swLiveConnect='false' width='597' height='215' name='flashhome' align=''");
document.write(" type='application/x-shockwave-flash'>");
document.write("</embed></object>");
}
else {
document.write("<img src='img/home/flashalt.jpg' width='597' height='215' border='0' alt='no flash alt tag'>");
}
</script>
<noscript>
<img src='img/home/flashalt.jpg' width='597' height='215' border='0' alt='no javascript alt tag'>
</noscript>
**Source**
http://web.mit.edu/is/web/reference/guidelines/flash/example.html