Auto-detect Flash scripts/method needed

Posted on 2003-03-21
Medium Priority
Last Modified: 2013-11-18
I've got a couple of sites done in flash. But i've yet to have any solution for detecting whether anot the viewers have any flash plugin. People have been complaining that flash doesn't show up on certain computers, especially on Mac. I've already run thru the macromedia flash support page, but i'm still not quite clear on which method to use. There, they mention about using javascripts but there is't any scripts provided. Please help. btw, i'm on Windows 98, flash 5.
Question by:bei2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

henryww earned 200 total points
ID: 8181478
if u have dreamweaver, just use the standard plugin check for flash.

or from the MM site it does give u the script to do the detection


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) { //Flash 4 or greater is available} else { //Flash 4 is not available}

here's another one for u ...

have a look and see if that helps


Expert Comment

ID: 8181501

Note: Netscape Navigator (Macintosh and Windows) and Internet Explorer (Macintosh) do not have built-in player detection.

just some extra info ...


Assisted Solution

grantunwin earned 200 total points
ID: 8187843
<script language="JavaScript" type="text/JavaScript">
function checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
  var ok=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
    ok=(plugins && plugins[plgIn]);
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
    if (plgIn.indexOf("Flash")!=-1 && window.flash!=null) ok=window.flash;
    else if (plgIn.indexOf("Director")!=-1 && window.dir!=null) ok=window.dir;
    else ok=autoGo; }
  if (!ok) theURL=altURL; if (theURL) window.location=theURL;

<!--Change gotflash.htm for flash found and noflash.htm for no flash found//-->

<body onLoad="checkPlugin('Shockwave Flash','gotflash.htm','noflash.htm',false);return document.returnValue">

<script name="Used by MM_checkPlugin" language="javascript">
with (navigator) if (appName.indexOf('Microsoft')!=-1 && appVersion.indexOf('Mac')==-1) document.write(''+
'<scr'+'ipt language="VBScript">\nOn error resume next\n'+
'dir = IsObject(CreateObject("SWCtl.SWCtl.1"))\n'+
'flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))\n</scr'+'ipt>');

This will go to the url gotflash.htm if flash is there and noflash.htm if it is.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

762 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