Re: Flash detection
| From: | Jingle Balls | Date: | Tue, 29 Aug 2000 01:30:51 +0000 |
| Subject: | Re: Flash detection | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14039@lists.php.net to get a copy of this message | ||
From the flash macromedia site, they suggest making a movie that is a couple
frames long as as small dimensions as possible, at the end of it you have a
redirect. Within the HTML itself you have refresh to the non flash page
that happens a little after the flash movie would have redirected.
Jason Murray <Jason.Murray@melbourneit.com.au> wrote in message
news:1595534C9032D411AECE00508BC766FB34FC0A@mercury.mit...
> Bill wrote:
> > There is a very easy and (I think) fool proof way to detect Flash.
> > (I am not a Flash or Php expert, but I use this on both of my sites).
> >
> > Create a Flash movie that has only 2 frames.
> > The 2nd frame should have the action to Get
> URL(http://yourflashpage.html).
> > Generate the Html file, and add a meta tag which redirects the browser
> > to the non-flash page after (say) 10s.
>
> I think that'll work, but it's still reliant on Flash being present.
>
> Since PHP cannot check the incoming browser for Flash abilities, this
needs
> to be done in JavaScript. I pulled the following code together for Flash
> detection on a site earlier this year, it seems to work reasonably well:
>
> <SCRIPT LANGUAGE="JavaScript">
> <!--
> file://Look for a version of Internet Explorer that supports ActiveX
(i.e., one
> that's
> file://running on a platform other than Mac or Windows 3.1) or a browser
that
> supports
> file://the plugin property of the navigator object and that has Flash
Player
> 2.0
> file://installed.
>
> if ((navigator.appName == "Microsoft Internet Explorer" &&
> navigator.appVersion.indexOf("Mac") == -1 &&
> navigator.appVersion.indexOf("3.1") == -1) ||
> (navigator.plugins &&
> navigator.plugins["Shockwave Flash"]) ||
> navigator.plugins["Shockwave Flash 2.0"])
> { // Go ahead and play the Flash.
> document.write('<TABLE CELLPADDING=0 CELLSPACING=0
> BORDER=0><TR><TD>\n');
> document.write('<OBJECT --blah-->\n');
> document.write(' <PARAM --blah-->\n');
> document.write(' <EMBED --blah--></EMBED>\n');
> document.write('</OBJECT></TD></TR>\n');
> document.write('</TABLE><BR>\n');
> document.write('<A HREF="mainpage.php3"><B>Main
> Menu</B></A>\n');
> }
> else
> { file://Load a pre-defined HTML page without Flash Player into the
browser
> window.
> window.location='mainpage.php3';
> }
> // -->
> </SCRIPT>
>
> Of course, you'll need to add a <NOSCRIPT> tag to do the <META>
> redirection...
> client didn't want it, so it's not here sorry :)
>
> Jason
>
> --
> Jason Murray
> jasonm@melbourneit.com.au
> Web Design Team, Melbourne IT
> Don't believe everything you're foretold.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>