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


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.


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

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


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.

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!!!

<!-- 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*)))
		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=",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="">');
	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]