homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

replace .swf file if no flash plugin found

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

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)

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)

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!


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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved