WebReference.com - Part 3 of Chapter 6 from Designing with JavaScript (2/4) | WebReference

WebReference.com - Part 3 of Chapter 6 from Designing with JavaScript (2/4)

To page 1current pageTo page 3To page 4
[previous] [next]

Designing with JavaScript, 2nd Edition

Would you like Flash with that?

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-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
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:

Figure 6-6: Enabling IE on Windows users to download the Flash ActiveX control
Figure 6-6: Enabling IE on Windows users to download the Flash ActiveX control


To page 1current pageTo page 3To page 4
[previous] [next]

Created: December 27, 2001
Revised: December 27, 2001


URL: http://webreference.com/programming/javascript/designing/chap6/3/2.html