Show image if flash is disabled

I've tried using a regular <img> tag, as well as the <asp:image> tag, but neither one works.

What is the smartest way to handle this?

<div class="productGroupTop">
        <asp:HyperLink id="linkage" runat="server">
        
	<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="800" height="616" id="RoomImage" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="false" />
	<param name="movie" value="<%= Page.ResolveUrl("~") %>flash/RoomImage.swf" />
	<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	
	<param name="wmode" value="transparent" />
	<embed src="<%= Page.ResolveUrl("~") %>flash/RoomImage.swf"  wmode="transaprent" quality="high" bgcolor="#ffffff" width="800" height="616" name="RoomImage" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	<asp:Image ID="imgGroupHero" Height="616px" Width="800px" runat="server" AlternateText="no flash" />
		</object>
 
            
        </asp:HyperLink>
    </div>

Open in new window

LVL 8
ApexCoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KelevraCommented:
Hi,

Use a javascript function that detect if Flash is enabled on the browser.

to do so you can use his framework:
http://www.featureblend.com/javascript-flash-detection-library.html


<script type="text/javascript"> 
	if(!FlashDetect.installed){
		alert("Flash is required to enjoy this site.");     	
	}else{
		alert("Flash is insalled on your Web browser.");
	}
	</script>	
    

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ccareyCommented:
I recommend using SWFObject to embed your SWF
http://code.google.com/p/swfobject/

the snippet below shows how to do what you need. Basically the alternate content (in your case an image) is replaced at runtime with the SWF if the flash player is detected

documentation is here:
http://code.google.com/p/swfobject/wiki/documentation

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>SWFObject dynamic embed - step 3</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="swfobject.js"></script>
    
    <script type="text/javascript">
    swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0");
    </script>
 
  </head>
  <body>
    <div id="myContent">
      <p>Alternative content -- PUT YOUR ALTERNATE IMAGE HERE</p>
    </div>
  </body>
</html>

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.