# Flash Detection

**URL:** https://forum.kirupa.com/t/flash-detection/29422
**Category:** Uncategorized
**Created:** [August 26, 2003, 4:13pm UTC](https://forum.kirupa.com/t/flash-detection/29422 "2003-08-26T16:13:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![BobbyDouglas](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@BobbyDouglas](https://forum.kirupa.com/u/BobbyDouglas)
#### Post date: [August 26, 2003, 4:13pm UTC](https://forum.kirupa.com/t/flash-detection/29422/1 "2003-08-26T16:13:24Z")

</div>

I have tried to use the flash detection script on my page right here: [http://www.mrbobdouglas.com/support\_test.php](http://www.mrbobdouglas.com/support_test.php)

However, I am using two flash and image files, I changed the variable names however it still does not work in the 2nd script.

Any ideas?

Also, what is your opininos on this script?

```auto
<SCRIPT Language = "JavaScript"> 

function FlashInstalled() 
{ 
   result = false; 

   if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) 
   { 
      result = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin; 
   } 
   else if (document.all && (navigator.appVersion.indexOf("Mac")==-1)) 
   { 
      eval ('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj) result = true; xObj = null; } catch (e) {}'); 
   } 
   return result; 
} 

function FlashWrite(url,width,height) 
{ 
   document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'); 
   document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" '); 
   document.write(' WIDTH=' + width + ' HEIGHT=' + height + '>'); 
   document.write(' <PARAM NAME=movie VALUE="' + url + '"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> '); 
   document.write(' <EMBED src="' + url + '" quality=high bgcolor=#FFFFFF '); 
   document.write(' swLiveConnect=FALSE WIDTH=' + width + ' HEIGHT=' + height); 
   document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'); 
   document.write(' </EMBED></OBJECT>'); 
} 
</SCRIPT>

```

And to call it

```auto
<SCRIPT Language = "JavaScript"> 
if (FlashInstalled()) 
   FlashWrite('flashfile.swf',468,60); 
else 
   document.write('<img src="img.gif" width=600 height=400 border="0">'); 
</SCRIPT>

```

:block:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 26, 2003, 4:16pm UTC](https://forum.kirupa.com/t/flash-detection/29422/2 "2003-08-26T16:16:11Z")

</div>

Here is the script since it did not show up at the top.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 28, 2003, 5:29am UTC](https://forum.kirupa.com/t/flash-detection/29422/3 "2003-08-28T05:29:23Z")

</div>

well?
