| home / programming / javascript / designing / chap6 / 3 | [previous] [next] |
|
Of course, what we really want to do is show a Flash movie if the Flash MIME type is found and, if it's not found, display a link to download the Flash plug-in. This is what most sites that use Flash do, as shown in Figure 6-4 and Figure 6-5.

Figure 6-4: Shockwave.com showing Flash content when the Flash Player is available

Figure 6-5: Shockwave.com displaying a page allowing the user to download Flash Player if it isn't installed
At Shockwave.com, visitors need to have the Flash plug-in, as shown in Figure 6-5. This is pretty reasonable, of course, since the site is all about Flash. Depending on the goals of your site, you may want to take a more flexible approach and support both Flash and non-Flash variations, to accommodate more users.
Let's write a script that creates dramatically different pages depending on the user's configuration. Here are the possibilities:
navigator.mimeTypes array (Navigator 3 and later or
IE 5 and later on the Mac) and Flash is found, display the Flash movie.mimeTypes array and Flash is not found, display a page
that links to the Flash download page and to a non-Flash version of the site.mimeTypes array), show the
movie if Flash is found, or download the Flash ActiveX control if Flash is not found
(see Figure 6-6).

Figure 6-6: Enabling IE on Windows users to download the Flash ActiveX control
| home / programming / javascript / designing / chap6 / 3 | [previous] [next] |
Created: December 27, 2001
Revised: December 27, 2001
URL: http://webreference.com/programming/javascript/designing/chap6/3/2.html