Chapter 26. Flash and Shockwave
Flash is
a ground-breaking multimedia format developed by Macromedia. Flash
gives you the ability to create full-screen animation, interactive
graphics, and integrated audio clips, all at remarkably small file
sizes. Its magic lies in the fact that it is a vector-based format
(rather than bitmap), resulting in extremely compact files well
suited for web delivery.
Vector
graphics define objects with mathematical formulas that require far
less data than describing each individual pixel of a bitmap image.
Flash began its life as FutureSplash, an animated vector technology
by a company named FutureWave. Macromedia acquired FutureSplash in
1997 and developed it into the robust multimedia tool it is today.
Flash movies (.swf ) are created using Macromedia's
Flash authoring tool. Flash (the application) includes tools for
illustration, animation, interaction sequencing, sound editing, and a
scripting engine. Flash 5, the latest version as of this writing,
offers an improved interface and advanced scripting capabilities
(ActionScript),
making Flash one of the most versatile and powerful formats for web
multimedia. For more information (and to download a demo copy), visit
Macromedia's site at http://www.flash.com.
Shockwave
for Director is another multimedia format from Macromedia that allows
rich CD-ROM-like multimedia interfaces created in Director to be
published on the Web. Director is a powerful tool for synchronizing
video, animation, and sound into a complex interactive presentation.
While Director Shockwave movies are much smaller than their Director
counterparts, they tend to be much larger than Flash movies and are
therefore not as well suited for web delivery. In its favor,
Shockwave movies can take advantage of the sophisticated Lingo
scripting language for complicated interactions (such as games) and
presentations. They can also contain QuickTime movies, MIDI audio,
and other formats that Flash doesn't support.
This chapter looks at both of these multimedia formats, but it
focuses on Flash primarily because it is the most popular and
appropriate format for the Web.
26.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 capabilities introduced in Flash 5, the uses
for Flash movies are limited only by imagination. Some possibilities
include:
Splash page animation
Interactive navigation toolbars
Animated ad banners
Interactive and zoomable maps
Interactive games
Complex applications (such as shopping), tied into a database on the server
Interactive forms
A whole web site interface, taking the place of traditional HTML pages
Cartoons
Music videos
A "jukebox" interface for playing MP3 files
While Flash introduces a number of significant improvements over what
can be accomplished using just HTML, there are a few drawbacks to
using Flash as well. Let's look at the pros and cons of using
Flash on a site.
26.1.1. Advantages
Many aspects of the Flash file format make it ideal for adding
interactive content to web pages:
-
File sizes are small.
As mentioned earlier, Flash's
vector format means small files and quick downloads.
-
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 smooths 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 pseudo-streamed from an HTTP server. In addition,
RealNetworks' RealPlayer 8 can play Flash 3 and 4 files if they
have been properly configured for true streaming. RealPlayer 6 and 7
can only play Flash 2. In all cases, the audio track must be
contained in a separate RealAudio file (Flash 5 makes it easy to
create both files). Flash content can also be contained in QuickTime
5 files and streamed from a QuickTime server.
-
It uses integrated sound. Flash
is a good way to bring background sound
and user-triggered sound effects to a web site. RealFlash (described
later in the chapter) enables Flash animation to be synchronized with
high-quality streaming audio.
-
The Flash format is well supported.
The Flash player required to play Flash files is available for
Windows and Mac OS platforms. The Flash player comes installed on
Windows machines with Windows 98 or ME. Netscape Navigator 4.06+ and
Internet Explorer 5+ contain the Flash player. The Flash format is
also natively supported by WebTV. Alternatively, Flash content can be
played via ActiveX controls (for IE on Windows) or with the Flash
Player Java Edition (on any Java-enabled browser). Macromedia
estimates that 95% or more of users are able to view Flash content.
(See "Plug-in player required" under Disadvantages for
the darker side of Flash support.)
-
It is scriptable. Flash uses the
ActionScript scripting language for controlling Flash behaviors.
ActionScript is discussed in the next section of 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.
FSCommands are not supported on the Macintosh platform in any
browser.
-
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. One of the first is Adobe's LiveMotion (a tool
for creating interactive buttons and animated objects), which saves
its files in Flash format to be played by the Flash player.
26.1.2. Disadvantages
And on the downside . . .
-
A plug-in player is required.
Standard Flash files require the Flash player to be installed on the
user's machine. Although this may seem like a small hurdle,
particularly since the Shockwave and Flash players are some of the
most popular and universally available plug-ins, the words
"plug-in required" are enough to make many clients say
"no way" without a second thought.
To make matters more confusing, there are now five versions of Flash
movies with their respective players available, so it is still an
issue making sure your users have the very latest player version if
you are using the very latest Flash features.
To its credit, Macromedia has anticipated such resistance and has
responded with some strategies. First, the Publish feature in Flash 4
and higher (previously the Aftershock utility) makes it easy to
generate code that detects the specific player version.
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.
-
Content is lost on nongraphical
browsers. Using Flash movies for document headlines and
navigation introduces the same problems as using static graphics in
place of text. People who cannot view your Flash animation (or even
an alternative GIF image) will not be able to read your content.
alt text helps, but is limited. In addition,
information in a Flash movie cannot be indexed or searched.
-
It always starts on the initial page of the
movie. Users cannot link to a certain page or scene within
a Flash movie. Links can lead users only to the first page of the
Flash movie.
-
Unix support is limited.
Although there is a Netscape
plug-in available for Linux Red Hat 6 and higher and 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.
-
Printing may be problematic. There
may be problems printing Flash content, particularly from a Netscape
browser on a Mac.
-
Expensive authoring software is
required. You currently need Macromedia's Flash
software to create Flash files. Flash 5 costs $399 ($149 to upgrade
from a previous version) as of this writing.
| | | 25.6. For Further Reading | | 26.2. Flash Power Tools |
Copyright © 2002 O'Reilly & Associates. All rights reserved.
|
|