On Dec 4, 8:26 am, GordonD <[EMAIL PROTECTED]> wrote:
> I've been wrestling with this for a while, and haven't solved it, so I
> have come here to ask.
> On the front page of my site (http://www.gordondiggs.com), I have a
> flash animation.  What I am trying to do is replace that with a static
> image if someone visits the site from an iPhone, so that there is
> something more on the page than the flash, which does not show.  Any
> ideas?

Browser detection should only be a last resort.  Have you considered
using script to check the navigator.plugins object?

Try something like:

function gotFlash()
{
  var pluginObj = navigator && navigator.plugins;

  if (pluginObj && pluginObj.length) {
    var p, i = pluginObj.length;

    if (typeof i != 'number') return;

    while (i--) {
      p = pluginObj[i].name;

      if (typeof p == 'string') {

        if (/shockwave/i.test(p) || /flash/i.test(p)){
          alert(p + ' is installed');
          return true;
        }
      }
    }
  }
}
gotFlash();


Or try something here:

<URL: http://www.moock.org/webdesign/flash/detection/moockfpi/ >


--
Rob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to