Welcome to WebmasterWorld Guest from 54.145.173.147

Forum Moderators: open

Message Too Old, No Replies

replace .swf file if no flash plugin found

   
11:53 am on Dec 21, 2003 (gmt 0)

10+ Year Member



Is there a script which can detect if there is flash plguin installed or no and accordingly replace / load a image file if not?
6:27 pm on Dec 21, 2003 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



There are both scripted (javascript or php) and non-scripted approaches to this, and they are all over the map. Some fail as often as 12% of the time. Some sniff for too much information, including such things as connection speed, version -- even the Flash update history!

I haven't personally used Flash for a long while, partly because of this absolute jungle of advice.

The simplest approach I've heard for non-scripted Flash detection involves hiding a very small Flash movie on an entry page. If that Flash file loads (that is, if Flash Player is present) then the Flash movie itself sends the visitor to a second page which contains the intended Flash content.

In this approach entry page also contains a meta-refresh tag. If the small Flash file hasn't redirected the visitor by the time interval indicated in the meta-refresh tag it sends the visitor to a non-Flash version of the same page.

The only downside I can see with this approach is that users with very slow connections or slow loading system might be taken to the non-Flash page before the Flash movie has a chance to load and do its re-direct. This means that you need to set the meta-refresh to a healthy interval.

I know you asked about a scripted approach, and more specifically, something on the page that simply calls an alternative file rather than a full-blown redirect. I'd love to hear from anyone who has a well tested, low failure rate script.

12:00 pm on Dec 22, 2003 (gmt 0)

10+ Year Member



Thanks for the reply tedster, but having a redirect thing is out option :)

I think this article has the solution! I have been banging my head all day to find nothing .. That should work great, thanks!

edit---

tested it successfully on:

netscape 1.22 (shows the image, doesn't show the missng plugin logo)

netscape 2 (shows image, shows the missing plugin's logo seperately)

netscape 3 (shows image, shows the missing plugin's logo seperately)

opera 3 (shows the image, doesn't show the missng plugin logo)

Anybody with older IE versions can test this? I have IE6 .. can't install another version of it.