# How do I display an alternate image, if the user doesnt have the Flash plugin?

**URL:** https://forum.kirupa.com/t/how-do-i-display-an-alternate-image-if-the-user-doesnt-have-the-flash-plugin/5738
**Category:** programming
**Created:** [September 20, 2002, 5:19pm UTC](https://forum.kirupa.com/t/how-do-i-display-an-alternate-image-if-the-user-doesnt-have-the-flash-plugin/5738 "2002-09-20T17:19:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jOEL](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jOEL](https://forum.kirupa.com/u/jOEL)
#### Post date: [September 20, 2002, 5:19pm UTC](https://forum.kirupa.com/t/how-do-i-display-an-alternate-image-if-the-user-doesnt-have-the-flash-plugin/5738/1 "2002-09-20T17:19:35Z")

</div>

Hello,

Can anybody offer a solution (I would imagine JavaScript) that would detect wether or not the user has the flash plugin installed and if not, would display an alternate image format in it’s place (like a gif, png etc…)?

We have flash in our site being used for navigational buttons and would like to have static images to fall back on without having to have an alternate page to load.

Any help would be greatly appreciated.

jOEL

---

<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: [September 20, 2002, 5:56pm UTC](https://forum.kirupa.com/t/how-do-i-display-an-alternate-image-if-the-user-doesnt-have-the-flash-plugin/5738/2 "2002-09-20T17:56:34Z")

</div>

[http://hotwired.lycos.com/webmonkey/01/10/index4a\_page6.html?tw=multimedia](http://hotwired.lycos.com/webmonkey/01/10/index4a_page6.html?tw=multimedia)

---

<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: [September 22, 2002, 7:15am UTC](https://forum.kirupa.com/t/how-do-i-display-an-alternate-image-if-the-user-doesnt-have-the-flash-plugin/5738/3 "2002-09-22T07:15:35Z")

</div>

Go to macromedia’s site and search for their “Flash detection kit”, it’s all in there.

---

<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: [September 25, 2002, 3:52am UTC](https://forum.kirupa.com/t/how-do-i-display-an-alternate-image-if-the-user-doesnt-have-the-flash-plugin/5738/4 "2002-09-25T03:52:17Z")

</div>

[http://www.kirupa.com/developer/mx/detection.asp](http://www.kirupa.com/developer/mx/detection.asp)

Okay, so now that we know where to find these scripts, what is the easiest way to test them?

Thanks,  
Lynn

---

<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: [September 25, 2002, 4:28am UTC](https://forum.kirupa.com/t/how-do-i-display-an-alternate-image-if-the-user-doesnt-have-the-flash-plugin/5738/5 "2002-09-25T04:28:54Z")

</div>

Pretty much the only way you can test it is to go onto a computer that doesn’t have the version of Flash you are testing. Or I believe you can uninstall your Flash Plugin and check then reinstall it.

---

<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: [October 21, 2002, 8:15pm UTC](https://forum.kirupa.com/t/how-do-i-display-an-alternate-image-if-the-user-doesnt-have-the-flash-plugin/5738/6 "2002-10-21T20:15:26Z")

</div>

Just change the

\<PARAM NAME=movie to the movie to display and ment.write('IMG SRC to the image to display!

Even change the noscript section to load an image instead!!!

```php

<SCRIPT LANGUAGE=JavaScript1.1>
<!-- this checks for plugin or not plugin!
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words*)))
		continue;
		var MM_PluginVersion = words*; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> 
'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next 
');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))
');
	document.write('</SCR' + 'IPT\> 
');
}
if ( MM_FlashCanPlay ) {
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
	document.write(' ID="script" WIDTH="320" HEIGHT="236" ALIGN="">');
	document.write(' <PARAM NAME=movie VALUE="TheSWFMovie.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> '); 
	document.write(' <EMBED src="TheSWFMovie.swf" quality=high bgcolor=#FFFFFF ');
	document.write(' swLiveConnect=FALSE WIDTH="320" HEIGHT="236" NAME="script" ALIGN=""');
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write(' </EMBED>');
	document.write(' </OBJECT>');
} else{
	document.write('IMG SRC="NoFlashImages.gif" WIDTH="320" HEIGHT="236" usemap="#script" BORDER=0></a>');
}
//-->
</SCRIPT><NOSCRIPT><a href="javascript:Flash('installeraFlash.php')"><IMG SRC="NoFlashNoJavaImages.gif"" WIDTH="320" HEIGHT="236" usemap="#script" BORDER=0></a></NOSCRIPT>

```

[EDIT by Lostinbeta to show code]
