PDA

View Full Version : How to find out if flash player is installed?


ConfusedOfLife
07-15-2002, 11:17 AM
Hi, I wana find out if my viewers have the flash player installed, if yes, I put a flash movie in my page, if not, I just put a simple picture in there, is it possible?

Cloudski
07-15-2002, 11:24 AM
Is there even a way??? I wouldn't know.. all I ever see is people have a link for flash player users, and another for no-flash player users....

Zvona
07-15-2002, 12:15 PM
<script type="text/javascript">
<!--
plgIn = "Shockwave Flash";
ok = false;
document.returnValue = false;

with (navigator)
{
if (document.all && appVersion.indexOf('Mac')==-1)
document.write('<scrip'+'t language="VBScript">\nOn error resume next\n' + 'dir = (IsObject(CreateObject("SWCtl.SWCtl.1")) Or IsObject(CreateObject("Macromedia.ActiveShockwave.1")))\n' + 'flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))\n<\/scrip'+'t>');

if (!document.all)
ok = (plugins && plugins[plgIn]);
else if (appVersion.indexOf('3.1') == -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)
document.write('<embed src="myFlash.swf" type="application/x-shockwave-flash" bgcolor="#000E78" loop="false" menu="false" quality="autohigh" width="800" height="172" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
else
document.write('<img src="myImage.gif" type="image/gif" alt="My Image">');
}
//-->
</script>

Apply inside BODY element