Showing alternate image if Flash is not installed or disabled.

ApexCo
ApexCo used Ask the Experts™
on
I'm using the attached code to display my flash files.

I'm loading up a movie depending on the page parameter in the URL, and while everything works fine in IE, it is not working in FF.

With the embed tag in place to get the movie to show in FF, the image appears below the flash file. In IE, it works with or without the embed tag. If Flash is on, the correct file is shown, if Flash is disabled the regular image shows.

What can I do to fix behavior in FireFox?

<div class="productGroupTop">
         <asp:HyperLink id="lnkGroupHero" runat="server">        
            <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="800" height="233" id="GroupPageMovie" align="middle">
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="allowFullScreen" value="false" />
            <param name="movie" value="<%= Page.ResolveUrl("~") %>/<%=FilePath.tostring() %>" />
            <param name="quality" value="high" />
            <param name="bgcolor" value="#ffffff" />
            <param name="wmode" value="transparent" />
            <param name="salign" value="tl" />
            <embed src="<%= Page.ResolveUrl("~") %>/<%=FilePath.tostring() %>" quality="high" bgcolor="#ffffff" width="800" height="233" name="GroupPageMovie" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
             <div id="heroImage">
            <asp:Image ID="imgGroupHero" runat="server" />
            </div>
         </object>
        </asp:HyperLink>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I'm gonna do what I hate others doing to me which is recommend a completely different solution to the one you already have! I wouldn't normally but I really think, in this case, you should switch to swfobject.

Here is the link: http://code.google.com/p/swfobject/

It is rapidly becoming the standard for Flash integration with HTML with particular reference to rock-solid reliability across platforms and browsers. It'll take you half an hour to download and integrate (maybe an hour) but once you have, you'll wonder how you ever survived without it.

Author

Commented:
I finally got a chance to look at the swfobject.

Thanks for linking that, it's awesome and was cake to implement. Took about 1 second to download and 5 minutes to get it all working.  :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial