official notice: moock fpi discontinued
Five years after the launch of the moock fpi detection system, I'm officially halting its development. Macromedia now offers a better flash detection system, called the Flash Player Detection Kit.

>> Get the Flash Player Detection Kit here...

The Flash Player Detection Kit actually incorporates (with permission) a fair amount of the code from the moock fpi, so it is the natural successor to the moock fpi. Other important approaches to consider include:

No matter which detection system you're using, please heed the following advice. The internet thanks you.
For posterity and reference, the final version of the moock fpi is offered below, entirely open-source. Note, however, that as of the release of Flash Player 10, the moock fpi will no longer function properly--it will incorrectly send all users with Flash Player 10 or above to the "Upgrade Flash" page.

moock flash player inspector
the moock flash player inspector, or "moock fpi" is a Flash plugin/activex control detector that is now officially obsolete. it was tested on the following browsers:

on those browsers, the fpi does not generate an error. when detection is not supported by the browser environment, we attempt to play it safe and issue the user non-flash content.

download the moock fpi, version 1.3.7
>> download moockfpi (zipped)
>> download moockfpi, .js file version (zipped)

note that the ".js file version" breaks the fpi up into separate external javascript (.js) files. external files make maintenance more manageable, and are handy for situations where detection is needed on many pages. however, external .js files are not supported by all browsers (the feature was introduced in javascript 1.1). if you are concerned about specific browsers, test with them thoroughly. the most current and fully tested version of the fpi is always the non-js file version. the .js file version is provided as a convenience.

usage instructions
for an exhaustive consideration of flash detection and publishing issues, see my slightly aging lecture notes from the session i gave on the topic at flash forward 2000 in new york city (july, 2000). in particular, you'll probably want to visit the fpi usage instructions slide.

for those who just want to dive into using the script, here's the bare-bones info you need:

the basic functioning of the fpi is governed by two variables you'll find at the top of the script on the page moockfpi.html in the first .zip file posted above. the variables are: 1) requiredVersion, which you should set to match the version of flash you demand of your visitors, and 2) useRedirect, which you should set to true if you want the user to be sent to separate pages depending on whether or not they meet your flash requirements, or to false if you want to dynamically insert the appropriate flash/nonflash content right into the detection page. if you use redirection, you also need to specify the location of the flash/nonflash pages. if you don't use redirection, you need to specify the html attributes of your flash movie in the dynamically written object/embed tags in the page <body>. finally, customize the <NOSCRIPT> tags (also in the page body) to provide alternatives for those without script-capable browsers or with scripting disabled.

to test the FPI, you should be sure to clear all browsers of the Flash Player using Macromedia's Flash Player Uninstaller. then install only the specific version of the Flash Player you want to test against.

you can use the test grid below to check the behavior of your browser with the moock fpi. the left column tells you which player is expected by the "test >>" link. the following three columns describe the expected results of the test. you should try the links out with all target browsers for your site.

required player version if found if too old if not found/
9 redirect to movie redirect to upgrade redirect to no-flash test >>
8 redirect to movie redirect to upgrade redirect to no-flash test >>
7 redirect to movie redirect to upgrade redirect to no-flash test >>
6 redirect to movie redirect to upgrade redirect to no-flash test >>
5 redirect to movie redirect to upgrade redirect to no-flash test >>
4 redirect to movie redirect to upgrade redirect to no-flash test >>
3 redirect to movie redirect to upgrade redirect to no-flash test >>
2 redirect to movie redirect to no-flash redirect to no-flash test >>
9 insert movie insert alt content insert alt content test >>
8 insert movie insert alt content insert alt content test >>
7 insert movie insert alt content insert alt content test >>
6 insert movie insert alt content insert alt content test >>
5 insert movie insert alt content insert alt content test >>
4 insert movie insert alt content insert alt content test >>
3 insert movie insert alt content insert alt content test >>
2 insert movie insert alt content insert alt content test >>

known issues

terms of use
see the terms of use.

revision history
april 18, 2000: version 1.0 beta posted.
april 19, 2000: version 1.1x beta: changed redirection from window.location to window.location.replace() so the back button skips over the redirect page. otherwise the user gets trapped in a redirect loop.
april 19, 2000: version 1.2x beta: put the main navigator detection code in a function so it loads completely before we call it (netscape seemed to get ahead of itself some of the time).
april 20, 2000: had to roll back to version 1.0 beta. netscape 4.72 on win98 sometimes has this problem with location.replace(): when re-visiting a page that was previously removed via the replace() method, the page is retrieved from cache, but truncated in the process, which in our case causes script errors that prevent redirection. unfortunately this means that we have to live with the back button problem. stupid netscape.
april 26, 2000: version 1.1 final beta: added no-cache tags to try to fight netscape's cache bug. it seems this bug is not only caused by location.replace(), as it appeared to be in version 1.2x.
may 18, 2000: version 1.2 gold release: okay, i realize the versioning is a bit fucked here, but this really *is* version 1.2 (as opposed to version 1.2x beta that i abandoned earlier). if this version survives the tests, it will become the gold fpi (that is, non-beta). this version has some general clean-ups in the code which do not affect any behaviour. it also has a reimplementation of the location.replace() method which prevents back button traps (this was part of v.1.1x beta). finally, it includes the no-cache tags of version 1.1 final which seem to be fixing the netscape caching bug described on april 20, 2000.
may 26, 2000: version 1.2.1 (first official non-beta release): version 1.2 tested out just fine except for one tiny problem: the vbscript tags were causing problems when the page was served as an asp page. i fixed that by writing the vbscript tags out in chunks. hence, version 1.2.1.
june 2, 2000: version 1.2.2: no functional changes. i just cleaned up a few ugly brackets in the code, and rewrote the comments so they're cleaner. i also tightened up the assignment of the version flags. it was overly verbose.
june 8, 2000: version 1.3.0 implements the following changes: a) now supports webtv. note that we assume webtv to have flash 2. this is hard-coded because webtv's navigator.plugins array returns "FutureSplashPM" as a description of Flash, which doesn't jive with our normal .plugins detection. in future, i'm hoping webtv will change to use the standard description so i can drop the hard-coded stuff. b) added a meta refresh that kicks in if javascript is disabled. c) improved instructions: configurable sections now surrounded in ########## signs. fixed some instruction typos. d) removed minor version from codebase attribute of object tag. that was causing an undesirable upgrade dialog in cases where the user had an older activex player.
june 16, 2000: version 1.3.1: had to take the meta refresh from version 1.3 out. sadly, netscape 4 on win98 executes the refresh even after the javascript replace() function has executed. drag... (thanks to simon batten for the bug report.)
july 18, 2000: added link to detection info and full use instructions.
july 27, 2000: version 1.3.2. a few good improvements, only one of which is a functional change. 1) removed the <SCRIPT> blocks at the top of the fpi which used to detect the javascript version. we now simply check explicitly for the location.replace method, which is the only reason we needed the script version anyway. 2) placed the meta tag from version 1.3.0 back in the fpi, but this time inside a <NOSCRIPT> tag, which works around the problem in win98 netscape where the meta refresh still fires after location.replace executes. 3) added a TYPE attribute for the script tags. 4) extracted the code into an optional .js file version. many thanks to david weingart for generously suggesting the nice improvements.
july 28, 2000: version 1.3.3. sometimes this thing can be such a royal pain in the ass to maintain. in this version, i had to add a workaround for a problem in ie4+ on win98. instead of just checking for window.replace in the redirection code, i now first check to see if typeof location.replace == "unknown". want to know why? on. attempting to evaluate location.replace in ie on win98 results in the following error: "object doesn't support this property or method". of course, we know the method is supported, so why the error? i don't know. feels like a bug, because evaluating a method should result in the string "function funcName() { [native code] }". for example alert( yields "function open() { [native code] }. for whatever reason, location.replace doesn't follow this convention. the only way around the problem is to make use of an equally bizarre behaviour: typeof location.replace yields the string "unknown". again, this seems pretty odd to me, and i've never seen in documented, but at least we can test against it, which means we don't have to resort to the separate <SCRIPT> tags again. if anyone has any insight on the issue, i'd be interested in hearing it. please test thoroughly...i'm a tad skeptical about this one...
august 11, 2000: version 1.3.4. i guess i should have guessed that checking for typeof location.replace would eventually cause problems. thankfully, kent myers reported continuing errors with all explicit checks for location.replace in ie on win98, so i completely removed the checks. we're back to doing things the "javascript version" way, which was how we started handling location.replace in v1.2.0. however, we still don't need separate, ugly, javascript version blocks because we set the js version in the ie activex-detection code block, which only works with ie4+ anyway. note that the activex detection isn't working with the flash 5 beta player, but i'm told that will be fixed in the player by the time the final version is released.
january 23, 2002: version 1.3.5. updated to work with future versions of the flash player, including v6. minor improvements to comments and usage instructions.
january 1, 2004: version 1.3.6. updated to work flash player 7, and hypothetical versions 8 and 9. added warning about using detection. escaped all slashes ("/") in the script to allow it to validate on the w3c's validator. updated webtv (now msntv) support for flash. as of january 1, msntv supports flash 4. changed detection of windows to search for string "win" (case-insensitive) instead of "Windows" (case-sensitive). added AOL-specific detection so the VBSCRIPT in the page doesn't cause problems for AOL browsers. changed the way the major version was being extracted from the description string so that multi-digit versions (e.g., 10, 11) can be extracted.
february 7, 2004: version 1.3.7. removed AOL-specific detection that was introduced in v1.3.6. the detection was causing problems on aol.
august 8, 2005: development halted. Official END OF LIFE.