JavaScript and Flash detection

Discussion in 'Javascript' started by Mika S., Jun 27, 2003.

  1. Mika S.

    Mika S. Guest


    How can I detect if the Flash plugin is installed? Should be working
    with the most common browsers and environments.

    Mika S., Jun 27, 2003
    1. Advertisements

  2. A good piece of code is available at, works well
    for all current browsers if you modify the call like this:

    <script language="Javascript" type="text/javascript">
    function getFlashVersion() { return null; };
    <script language="Javascript" type="text/javascript"
    Klaus Johannes Rusch, Jun 27, 2003
    1. Advertisements

  3. Mika S.

    Mika S. Guest

    Thanks for that, Randy. A very good point.

    Mika S., Jun 28, 2003
  4. See "This is a collection
    of scripts that I've created and/or modified. Do whatever you want with
    them. All I ask is that any comments in the code remain as is"
    Klaus Johannes Rusch, Jun 30, 2003
  5. I suspect that Flash plugin detection will work more reliably than asking users
    whether or not they have Flash installed ("Do I have what installed?") If
    Javascript is not available falling back to the plain, non-Flash version is usually
    a reasonable alternative.

    <script type="text/javascript">
    if (goodFlashVersion) {
    document.write('<!-- put flash stuff here -->');
    else {
    document.write('<!-- put plain version here -->');
    <!-- put plain version here -->
    Klaus Johannes Rusch, Jun 30, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.