Determining if Flash Player is on the client

I need a way that works in both IE and Netscape at least version 4 of each.  If it works in previous version all the better.  What it needs to do is determine if the client can view a flash movie if not it needs to direct them to a different page.
cavacaspAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SuperMarioCommented:
Write object HTML code like this:

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
 ID=index WIDTH=100% HEIGHT=100%>
 <PARAM NAME=movie VALUE="index.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <SCRIPT LANGUAGE=JavaScript>
<!--
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)) >= 4 ) {
      // Check for Flash version 4 or greater in Netscape
      document.write('<EMBED src="index.swf" quality=high bgcolor=#000000 ');
      document.write(' swLiveConnect=FALSE WIDTH=100% HEIGHT=100%');
      document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
      // Netscape 2 will display the IMG tag below so don't write an extra one
      document.write('<IMG SRC="index.gif" WIDTH=710 HEIGHT=564 BORDER=0>');
}
//-->
</SCRIPT>
<NOEMBED><IMG SRC="index.gif" WIDTH=710 HEIGHT=564 usemap="#index" BORDER=0></NOEMBED>
<NOSCRIPT><IMG SRC="index.gif" WIDTH=710 HEIGHT=564 usemap="#index" BORDER=0></NOSCRIPT>
</OBJECT>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.