Log in

View Full Version : How to show image if no flash is installed?



dchopda
08-16-2010, 11:18 AM
Hi,

I have one flash image on my site's home page.

Many users don't have flash installed on their machine / browsers, so I have decided to show a image instead of flash image in such situation in all browsers.

Can anybody help me in how to check if user don't have flash enabled or how to show a image if there is no flash installed?

Thanks.

jscheuer1
08-17-2010, 03:09 AM
There are various ways. If you are using a single valid object tag, or two nested object tags, you can just put the alternate content inside the innermost object tag. Example using a single valid object tag:


<object type="application/x-shockwave-flash" style="height: 80%; width: 80%;" data="mymovie.swf" >
<param name="movie" value="mymovie.swf" >
<param name="allowFullScreen" value="true" >
<param name="wmode" value="transparent" >
<div>
<img src="myimage.jpg" alt="original image" title="">
</div>
</object>

Or you can use swfobject:

http://code.google.com/p/swfobject/

which allows you to have alternate content in various ways.

pixel
08-23-2010, 11:33 AM
Thanks for the solution, very useful! :D