Section 35.1. Using Flash on Web Pages


35.1. Using Flash on Web Pages

Flash movies can be placed on a web page, or they can be used as a web page. Moreover, with the advanced scripting present since Flash 5, and the inclusion of server-side applications such as Flash Media Server 2, Breeze, and Flex, the uses for Flash movies are limited only by imagination. Some possibilities include:

  • Art and motion graphics

  • Animation and cartooning

  • Splash pages, intros, and ad banners

  • Interaction and navigation

  • Multimedia web sites

  • Video and audio players

  • E-commerce

  • Rich media applications

  • Data and statistical applications

  • Web-based training

  • Distance learning

  • Live communication

While Flash introduces a number of significant improvements over what can be accomplished using just HTML and scripting in the browser, there are a few drawbacks to using Flash as well. Let's look at the pros and cons of using Flash on a site.

35.1.1. Advantages

Many aspects of the Flash file format make it ideal for adding interactive content to web pages:


File sizes are small.

Flash allows for reusable graphics, buttons, and code objects without adding additional bytes for every instance used. Flash movies also use vector graphics, which rely on math to designate lines and color as opposed to storing the colors of individual pixels, such as with raster graphics. This saves a lot of file size.


It is scalable.

Flash images and animations can be resized with no loss of detail, making it easy to fill the whole browser window with a Flash interface without adding to the file size. Flash can be used to create static images, such as maps, where zooming in to view the image in finer detail is desirable.


Image quality is high.

Real-time anti-aliasing smoothes the edges of graphics and text, regardless of the display size. Users can zoom in on vector graphics with no loss of image quality.


It uses streaming technology.

Flash files start playing quickly and continue to play as they download, so they can be pseudostreamed from an HTTP server. The Flash Player itself can stream video and audio, including MPEG and Flash video files.


Integrated audio and video.

Flash is a good way to bring background sound and user-triggered sound effects to a web site. With the advent of Flash MX you can also import files of type .mov (QuickTime), AVI, and .mpg (MPEG), and with the professional version of Flash MX 2004, you can edit and crop the video before adding it to the timeline. With Flash 8, you can employ VP6 codec for very high-resolution video.


The Flash format is well supported.

The Flash Player, which is required to play Flash (.swf) files, is available for Windows, Mac OS, Linux, and Sun Solaris platforms. As of this writing, the current version is the Flash 8 Player. Over 98% of all browsers currently support Flash, with the newest player being shipped with new computers.


It is scriptable.

Flash uses the ActionScript scripting language for controlling Flash behaviors. (ActionScript is discussed in detail later in this chapter.) In addition, you can use JavaScript commands from the HTML file to control a Flash element on a page. The reverse is true as well; by using FSCommands in the Flash movie, you can activate JavaScript commands from within the Flash file to control web page elements.


It has an open format.

Macromedia has made the Flash file format publicly available, which means that other software developers can build Flash support into their applications.


Font sets are transferable.

Any font used in a Flash .swf file can be read on any system, whether or not it has that font in its system.


Consistency.

Although different types of browsers have different implementations of JavaScript and even HTML and CSS, Flash Players provide a cross-browser consistency.

35.1.2. Disadvantages

Of course, you must also consider the downside to Flash.


A plug-in player is required.

Standard Flash files require the Flash Player to be installed on the user's machine, though all major browsers come standard with some version of the Flash Player. The words "plug-in required," however, are enough to make many clients say "no way" without a second thought. Although Flash reaches over 98% of all browsers, your client might have an older player that doesn't support newer features you are attempting to use, so double-check with them before beginning development.

Resisting Plug-In Resistance

How do you respond when clients say no upon hearing a plug-in is required? To its credit, Macromedia has anticipated such resistance and has responded with some strategies. For example, the Publish feature in Flash 4 and higher (previously the Aftershock utility) makes it easy to generate code that detects the specific player version. Flash 8 has made it even easier for both detection and update, which can now occur seamlessly behind the scenes.

Additionally, there are alternatives. Flash Player Java Edition enables Flash files to play on any Java-enabled browser. The Flash authoring tool also allows you to export your animation as an animated GIF, although you may need to optimize it in a dedicated GIF animation utility.



Older Flash Players and .swf files are not 508 compliant.

Using Flash movies for document headlines and navigation introduces the same problems as using static graphics in place of text for nongraphical browsers and screen readers. The contents of the Flash movie are a black box to these users. alt text helps, but is limited. Fortunately with the advent of the Flash 6 Player (the current version is now the Flash 8 Player), screen readers such as JAWS and Windows-eyes can access the content in the Flash movie.


It always starts on the initial page of the movie.

Other web sites cannot link to a certain page or scene within a Flash movie on another site.


Unix support is limited.

Although there is a Netscape plug-in available for Linux Red Hat 6 and higher as well as Solaris, other Unix users are out of luck when it comes to viewing Flash files. The Flash Player Java Edition is one solution to this problem. There is no Unix version of the Flash authoring tool.


Authoring software is required.

Flash MX costs $499 ($199 to upgrade from a previous version), and the professional version costs $699 ($299 to upgrade from a previous version). Several third-party tools, such as Swish (SWISHzone.com) and Wildform , let you produce Flash (.swf) files at a fraction of the cost of Macromedia Flash, but, of course, they have only a fraction of the functionality of Flash.

Educators and students can purchase Flash at a much reduced charge of $99, though even this cost is subsidized by many schools and universities when purchased on campus.





Web Design in a Nutshell
Web Design in a Nutshell: A Desktop Quick Reference (In a Nutshell (OReilly))
ISBN: 0596009879
EAN: 2147483647
Year: 2006
Pages: 325

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net