Flash detection script

I have a challenging situation here – at least for me. I need a Flash detection script that will do one of the following: 1) detect what player version a user has and prompt them to download the latest one or 2) detect what version a user has, and if it’s less than what the script specifies (i.e. vs 6), html code displays instead.

I’ve seen the detection scripts on Kirupa and one is close to what I need - if the script detects an older player, it displays an image instead. That won’t work for me. I need to display HTML from within an include file.

And, here’s something else unique to this situation. I actually have 2 flash movies. The page that contains the movie displays different content depending upon the user level. If a user signs on at level 1, they see one version of the Flash movie. If they sign on at level 2, they see the other.

That is why I need to use an include file and not an image. The include file contains asp script to discern that difference!

Can this be done? I’ve tried it with Kirupa’s script and it didn’t work. But that may be due to the fact that I am not very knowledgeable at writing or editing scripts in any language.

This is what I have: first the Kirupa script contaning the detection code. Then my Flash embed code. Is this the correct way to do this?

<HTML>
<HEAD>
<meta http-equiv=Content-Type content=“text/html; charset=ISO-8859-1”>
<TITLE>flashbannerIMD3</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<SCRIPT LANGUAGE=JavaScript1.1>
<!–
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes[“application/x-shockwave-flash”]) ? navigator.mimeTypes[“application/x-shockwave-flash”].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins[“Shockwave Flash”].description.split(" “);
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words*)))
continue;
var MM_PluginVersion = words*;
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf(“MSIE”)>=0
&& (navigator.appVersion.indexOf(“Win”) != -1)) {
document.write(’<SCR’ + 'IPT LANGUAGE=VBScript&gt;
'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next
‘);
document.write(‘MM_FlashCanPlay = ( IsObject(CreateObject(“ShockwaveFlash.ShockwaveFlash.” & MM_contentVersion)))
‘);
document.write(’</SCR’ + ‘IPT&gt;
‘);
}
if ( MM_FlashCanPlay ) {
document.write(’<OBJECT classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”’);
document.write(’ codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0” ‘);
document.write(’ ID=“script” WIDTH=“300” HEIGHT=“200” ALIGN=”">’);
document.write(’ <PARAM NAME=movie VALUE=“images/flashbannerIMD4.swf”> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> ‘);
document.write(’ <EMBED src=“images/flashbannerIMD4.swf” quality=high bgcolor=#FFFFFF ‘);
document.write(’ swLiveConnect=FALSE WIDTH=“300” HEIGHT=“200” NAME=“script” ALIGN=""’);
document.write(’ TYPE=“application/x-shockwave-flash” PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">’);
document.write(’ </EMBED>’);
document.write(’ </OBJECT>’);
} else{
document.write(’<!–#include file=“FeaturedProductsIMD.asp”–>’);
}
//–>
</SCRIPT><NOSCRIPT><!–#include file=“FeaturedProductsIMD.asp”–></NOSCRIPT>

<!-- URL’s used in the movie–>
<!-- text used in the movie–>
<!–Click here for more informationon all 2006 changes.–><OBJECT classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”
codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0
WIDTH=“375” HEIGHT=“200” id=“flashbannerIMD4” ALIGN="">
<PARAM NAME=movie VALUE=“images/flashbannerIMD4.swf”> <PARAM NAME=quality VALUE=best> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=“images/flashbannerIMD4.swf” quality=best wmode=transparent bgcolor=#FFFFFF WIDTH=“375” HEIGHT=“200” NAME=“flashbannerIMD4” ALIGN=""
TYPE=“application/x-shockwave-flash” PLUGINSPAGE="<A href=“http://www.macromedia.com/go/getflashplayer"></EMBED">http://www.macromedia.com/go/getflashplayer”></EMBED>
</OBJECT>
</BODY>
</HTML>

Thanks in advance for any help or suggestions!
SAnkerbrand