How to detect if browser has flash if not show static image

I knew how to do it with the old flash settings there was a section for “nocode” I believe but with this new javascript output that they do when I press F12 I have no idea.

Basically I just want to know if they have flash and if they dont I can show a static image or menu bar instead. No need to ask them to download just to veiw my site.

You should be able to just include alternate content in the flash code. If you post the code you are using to embed it, I can give a better answer. :slight_smile:


<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', '550',
			'height', '400',
			'src', 'Untitled-1',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'transparent',
			'devicefont', 'false',
			'id', 'Untitled-1',
			'bgcolor', '#FF0000',
			'name', 'Untitled-1',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', 'Untitled-1',
			'salign', ''
			); //end AC code
	}
</script>
<noscript>
	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="Untitled-1" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="false" />
	<param name="movie" value="Untitled-1.swf" /><param name="quality" value="high" /><param name="bgcolor" value="transparent" />	<embed src="Untitled-1.swf" quality="high" bgcolor="transparent" width="550" height="400" name="Untitled-1" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	</object>
</noscript>

<!–url’s used in the movie–>
<!–text used in the movie–>
<!-- saved from url=(0013)about:internet –>
<script language=“javascript”>
if (AC_FL_RunContent == 0) {
alert(“This page requires AC_RunActiveContent.js.”);
} else {
AC_FL_RunContent(
‘codebase’, ‘http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0’,
‘width’, ‘550’,
‘height’, ‘400’,
‘src’, ‘Untitled-1’,
‘quality’, ‘high’,
‘pluginspage’, ‘http://www.macromedia.com/go/getflashplayer’,
‘align’, ‘middle’,
‘play’, ‘true’,
‘loop’, ‘true’,
‘scale’, ‘showall’,
‘wmode’, ‘transparent’,
‘devicefont’, ‘false’,
‘id’, ‘Untitled-1’,
‘bgcolor’, ‘#FF0000’,
‘name’, ‘Untitled-1’,
‘menu’, ‘true’,
‘allowFullScreen’, ‘false’,
‘allowScriptAccess’,‘sameDomain’,
‘movie’, ‘Untitled-1’,
‘salign’, ‘’
); //end AC code
}
</script>
<noscript>
<object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0” width=“550” height=“400” id=“Untitled-1” align=“middle”>
<param name=“allowScriptAccess” value=“sameDomain” />
<param name=“allowFullScreen” value=“false” />
<param name=“movie” value=“Untitled-1.swf” /><param name=“quality” value=“high” /><param name=“bgcolor” value=“transparent” /> <embed src=“Untitled-1.swf” quality=“high” bgcolor=“transparent” width=“550” height=“400” name=“Untitled-1” align=“middle” allowScriptAccess=“sameDomain” allowFullScreen=“false” type=“application/x-shockwave-flash” pluginspage=“http://www.macromedia.com/go/getflashplayer” />
</object>
</noscript>

If you use swfobject it replaces the content of a div with the swf, so all you have to do is put the image in the div in normal html.
You could use the noscript area to achieve a similar result in the code above.

I thought noscript was for if they don’t have javascript enabled…

It will work with flash too. Though swfobject is the better solution IMO.