I have a simple aspx web page that includes a flash video. I'd like to replace the video with a jpeg for those browsers that don't support flash. Does anyone know of an example showing how to do this?
Here's the flash div from my aspx:
<div id="flash">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
width="600" height="197" title=""
style="z-index: 1; font-family: georgia;">
<param name="movie" value="intro.swf" />
<param name="quality" value="high" />
<param name="wmode" valu开发者_运维技巧e="opaque" />
<embed src="intro.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="600" height="197"></embed>
</object>
</div>
Generally, I would recommend using SwfObject for embedding Flash in HTML, and taking care of Flash Player detection. It has become more or less the de facto standard for doing so, and has a really simple mechanism for what you want to do, to display alternative content when Flash Player is not available.
http://code.google.com/p/swfobject/
Edit: I see now that Adrian already mentioned SwfObject in his answer.
HttpContext.Current.Request.Browser.ActiveXControls
You can find how it works on that link.
I recommend to implement the fallback on the client side(browser) also.
http://blog.deconcept.com/swfobject/
精彩评论