Detect Flash Player 8 on users computer and display message if player is installed, link to Flash Player if not.

Posted on 2006-04-05
Last Modified: 2010-04-03
I would like to be able to detect if a user viewing my site has Flash Player 8 installed. If they do not have it then I would like to display a message and link to get the player. If they do have it then I would just like it to say FLash PLayer 8 detected and provide a link to the site. Any thoughts on how I can accomplish this. I already have some javascript that I got from somewhere that detects if Flash is installed but not verison 8(or higher whenever available) so some people still can't view it because they have verison 7 or earlier.  I would like to use the code I have and if anyone can tweak it so that it works for what I need that would be great. Here is the code I am currently using:

<script language="JavaScript" type="text/javascript">
 var useFlash = navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
// -->

<script language="VBScript" type="text/vbscript">
 On error resume next
 useFlash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))
// -->

<script language="JavaScript" type="text/javascript">
if ( useFlash )
   document.write("Flash Player Detected!");
   document.write("Flash Not Detected! Please <a>download</a> the latest plugin.");
// -->

Question by:apriigem
    LVL 19

    Accepted Solution

    All you really have to do is select the Publish Settings and check the Detect version of Flash box.. it will also let you pick the version. Voila!



    Author Comment

    But i have a plain html page before you enter the site that has the flash, will this work for that page?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
    While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now