How to show image in place of swf if flash player is not installed in browser !
plz help !

How to show image in place of swf if flash player is not installed in browser !
plz help !

The standard approach would be to use some javascript to check whether the users browser has flash-player installed and if not display an image instead...Do a quick google and you should find several examples of code to do this.

Unfortunately this approach can cause problems if you want your site to work properly with several different browsers, so you'll have to be careful what code/tags you're using in your javascript and HTML.

However, there is a very good platform/browser independent javascript available for embedding flash movies into web-pages called swfobject...try googling "swfobject.js" and you'll find it...I can't remember offhand, but that may offer a solution to your problem...I think you might be able to specify an alternate image to use if there is no flash-player installed...But I haven't looked at it or used it for a while, so I could be wrong!

Having said that, there is another far simpler way you could go about it which doesn't use javascript at all which might also do the trick! Steps are listed below:

1. Embed the flash movie in a div on your page (using the <object> tag, don't use <embed> as it is deprecated!).

2. In the css for your page, set the background image property for the div to the image you want to use if there is no flash player.

And that is it...how simple was that?

This way if the user has flash-player installed, they should see the flash movie as normal. But if they don't, they should see the background image instead..It's a simple trick I've used in the past and it completely side-steps the whole cross-browser compatibility issue!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.