CMPUT 499: What is Flash?
By Darryl Tang and Benoit Moniere

Introduction

Macromedia Flash is a Web technology used for creating stunning graphics and complex animations on Web sites or standalone applications. It is great for making beautiful, smooth, and extremely compact graphics such as web navigation interfaces, desktop applications, ad banners, and full-motion video. What is great about Flash is that you can have animation, scalability and interactivity in your presentation, while keeping the file size small enough to stream across a normal modem connection. Flash is everywhere. Currently about 95% of Internet users have the necessary hardware and software capable of supporting Macromedia Flash files. Flash presentations are compatible with both Internet Explorer and Netscape browsers through plug-ins. As well, Flash presentations can be played back consistently on browsers and desktops across different operating system platforms such as Windows, Macintosh, Solaris, and Linux. Even other popular Web hardware and software products have Flash technology built into their products. Programs like Quicktime, ActiveX, Flash Player Java Edition, GIF, animated GIF, RealPlayer, Shockwave Flash plug-in, and WebTV are capable of viewing Flash content.

Flash is such a popular application because it takes many multi-media components and combines them into one multi-faceted program. It is a vector drawing and photo-manipulating program like Adobe Illustrator and Photoshop, which allows users to create unique images and be able to modify them. It is a multi-media authoring program, which allows the user to compose full-motion movies using graphics, sounds, and animations. It is a sophisticated animation program, which allows the user to create a range of animations from simple Web ornaments to elaborate cartoons.  Furthermore, it is a scripting language, which is capable of creating dynamic, interactive web interfaces or movies, with the use of ActionScript.
 

Vector-Drawing
First, Flash is a vector-based drawing program that allows the user to create images as a vector file. Vector images are composed of mathematically defined shapes, lines, and curves called vectors. Flash draws resolution-independent shapes using coordinate points and connects them with lines called paths. Unlike Raster images, such as bitmaps, which uses small pixels and are therefore resolution-dependent, vector images are resolution-independent so Flash can perfectly scale them without losing detail. This advantage makes vectors preferable for creating type, bold graphics, such as logos, and Web animation. The drawing tools in Flash allow the user to create vector objects using predefined rectangles, circles, lines, or text. As well, Flash allows the user to modify created objects by allowing them to change the coordinates and dimensions and adding 3-D fill effects.
Photo Manipulation
However, since bitmaps, which are Rastor images, are best for Photographic quality, Flash is also a photo manipulation program for it handles these images. Bitmaps are highly detailed, more so than vector images, as the placement and color of each pixel are already mapped out. However, unlike vectors, they have much larger file sizes and are not scalable without losing detail. Flash does not create Bitmaps, but the user can import these images and modify them by changing its properties and resolution. Flash can even convert bitmaps to vectors by tracing the bitmap, specifying how detailed and smooth the trace will be through color threshold, curve fit, and corner threshold, into coordinate points of a vector.
Multimedia Authoring
Flash is a multimedia-authoring program, which allows the user to author interactive movies that can contain all kinds of media, such as sound, still graphics, animation, and action commands. A Flash movie can be many things. Some examples are a Flash animation for a Web site; interactive map on a website; an interactive form; a Standalone Web application; Entire Web site without any HTML coding; and Web games. All Flash movies are made up of any number of individual scenes, which are segments of a Flash movie. The user can rearrange the sequence of the scenes to create a different playing order. Each scene can have an unlimited number of layers, which are used to keep objects separate. Each layer contains a set of objects which are to be shown together and may have a stacking order within it to determine which objects cover each other if they overlap. A timeline is used to determine the order of when the content of each layer will show up within the scene. Furthermore, each layer may be composed of a sequence of one or more frames that are controlled by the timeline. The frames are flashed out in sequence at a user specified frame rate, which creates the illusion of time and therefore an animation.
Animation
Thus, Flash is also an animation-program as it allows the user to create animations by changing the content of the frames within the layers of a movie. In Flash, there are two basic kinds of frames: static frames and keyframes. Static frames are simply a repeat of the content of the prior frame and are used for still graphics. Keyframes on the other hand, describes the unique changes or placement of content. Flash Animation is achieved by linking these keyframes through either frame-by-frame animation, which changes the contents on a frame-by-frame basis, or by tweening, which defines two keyframes and enables Flash to interpolate the contents of the frames in between.  Frame-by-frame animation can highlight subtle differences between frames and therefore, is ideal for complex animations. This process simply creates animation by adding a layer's keyframes successively onto the timeline. However, this process is highly tedious and time consuming since unique art needs to be created for each frame in the animation.  In contrast, the main advantage in tweened animation is that it saves time and space because the user does not have to draw out animation for each frame. With tweening, the user can easily morph two shapes or create the illusion of motion by defining different shapes or positions in separate frames, and then have Flash interpolate frames between the two points. However, sometimes using tweening, the user cannot create the exact frames they want for their animation as they can in frame-by frame. In either case, Flash primarily uses vector images instead of bitmaps for animation unlike other animation and media programs. Whereas bitmap animation takes megabytes to store, vector animation takes up far less space and therefore Flash can render the vector description of each frame quicker.
Sounds
Being a multi-media program, Flash also allows the user to incorporate sounds into their graphics and movies. Flash cannot create audio on its own, however it can import and edit these files. When importing audio files, sounds are stored as separate layers so the user can reuse these sounds without increasing the file size of their Flash file. As a note, it is generally a good idea to just have a small audio clip that can be looped because using big sound files can dramatically increase the file size of a user's Flash file. Sound effects can be assigned to objects such as buttons to enhance its presentation. As well, sound can be used to add another dimension to animations. The user can incorporate sounds in the timeline to synchronize the sounds with complex animations, buttons, and even cartoons. There are three types of synchronization in Flash. Event sounds are sounds independent of the timeline. Therefore, these sounds permeate throughout the movie and continue after the movie has ended. These are useful for background music and other sounds that do not need to be synced. Stream sounds are incorporated into the timeline. The sounds play for as long as it is specified in the timeline as Flash attempts to keep the animation in pace with the sound. Lastly, Start/Stop sounds are similar to Event sounds. However, the viewer can start or stop the sounds by manipulating the start or stop buttons.
Symbols
To help the authoring component reduce the file size of the files it creates, Flash includes a graphic and movie library that stores symbols and symbol instances. A symbol is a reusable element created in Flash, which can be used in any Flash file. An instance of a given symbol is created each time the user places the symbol in a scene or inside another symbol. What is useful about using symbols in Flash is that the symbol only needs to be saved once in a file. This means that the user can create as many instances of a symbol without adding to the file size. There are three types of symbols in Flash. Graphic symbols are reusable static images and simple animations that are tied in with the main timeline of the movie. However, graphic symbols do not contain sounds or actions.  Secondly, Movie clips are mini-movies complete with actions, other symbols, and sounds. These clips have their own timelines and can therefore run independently of the main timeline. Lastly, button symbols are button templates, which already have defined graphics, symbols, and sounds. Actions can later be added onto the instances of the button symbols.
Scripting Language / Interactivity
Flash is not only a multi-media program, but it is a scripting language as well. Using ActionScripts, Flash can enable action and event handlers to add interactivity to Flash presentations.  Action scripts are used to program and attach scripting actions onto events such as button clicks, keystrokes, or commands issued from a keyframe. During movie playback or browsing a Flash web page, the programmed event handlers handle these triggered events by activating one of Flash's actions in response. These actions consists of changing to another frame; playing a movie or movie clip; stopping the movie; toggling the visual-rendering quality; stopping all sounds; or linking to another URL. Syntactically, Flash's ActionScipt most resembles PERL, as it contains similar building blocks such as variables, operators, conditionals, loops, expressions, built-in properties, and subroutines. Therefore, a major use of ActionScript is for creating CGI forms on WebPages. Flash forms conforms to the standard GET and POST communications of CGI, where the forms takes in the values and can manipulates them, store them, or return them to Flash so it can be displayed or used to originate Flash movies.
Publishing
After creating amazing Flash presentation containing elaborate animation, CD quality sound files, and ActionScripted interactivity, the user must publish the movie to delivery mediums such as the Web, a desktop, a floppy disk, or other compatible programs so Internet users around the World can view them. Therefore, Flash files must be exported into SWF (Flash Movie format), GIF, JPG, PNG, and QuickTime formats before the viewers can see the presentation. There are generally three ways Flash presentations are played back after being published. The most common method movies can be played back is through a Web browser as a Flash web page. The web page can be partially or 100% created by Flash, as Flash can be fully self-contained. This method requires a Flash player plug-in to view the presentation. Flash Presentation can also be played back on the user's desktop using a Flash Player application or as a standalone projector, which does not require a browser or player to play. Furthermore, Flash files are compatible and can be exported to some outside programs, such as Quicktime, to play or display Flash movies.
How does it run once published?
If a Flash file is published, how does it run on Flash Player exactly? Flash Player supports scripting capabilities mentioned above and server-side connectivity. The server-side of the Flash Player stores all the Flash data. While the client-side, which is the user's browser or the user's processor, processes the data to assemble it into the final product. Therefore, all media and files need to be downloaded onto the client side before the user can view the Flash presentation. By bringing the source data over to the client, the files lose the protection of the firewall, which means anyone can have access to them. In addition, it is not that efficient because Flash Player needs to download multiple data, which takes longer to download than just downloading one complete file. In addition, Flash Player is limited to only playing back SWF files.

Therefore, Macromedia offers another application called the Macromedia Generator, which works together with Flash Player to improve Flash’s efficiency, by processing the Flash file's media and text on the server side. With Generator, all the data are assembled on the server. So the only thing sent to the client is the finished product, which means better protection and faster downloads. Also, it is with Generator that Flash presentations can be sent out in all Flash formats, not just SWF.
 

Statistics
Out of all the total number of web users, almost all of them can view Flash content.  As of December 2000, 96.4% of web users can view Flash content. That is 311 million people! Although many web users can view Flash content, this does not necessarily mean that they all have a Macromedia Flash Player or Generator.  Web users may also use Java players, Windows Media Player, Acrobat Reader, Shockwave Player, etc. on their browsers to view Flash content.

Worldwide Macromedia Flash penetration          June 2000 Sept. 2000 Dec. 2000
------------------------------------------------------------------------------------------
Total # of web users [IDC]   269 million 300 million 323 million
% who can view Flash content [NPD]         91.8 %  96.4 %  96.4 %
Total Macromedia Flash penetration  248 million 289 million 311 million

Flash Player Technology breakdown (% of Browers that have...) [NPD]
-------------------------------------------------------------------------------------------
Macromedia Flash Player  96 %
Java     87 %
Windows Media Player  64 %
Acrobat Reader   62 %
Macromedia Shockwave Player 58 %
Real Player    52 %
Quicktime Player   35 %
SVG Player    2 %

[IDC]: Number of online (Web) users - IDC Online User Forecast International Data Corporation
[NPD]: NPD Online Worldwide survey - Conducted Quarterly
 

Flash vs. Director
So how does Flash compare with other Multimedia programs in designing web-based multimedia presentations? Flash's main competition comes from a program called Director Shockwave Internet Studio. Before Flash, there was Director, which creates shockwave files for multi-media purposes. Director was originally intended for making interactive CD-ROMs and Kiosks, but newer versions became more Web-centered once the CD-ROM market collapsed a few years ago. They eventually made their files a little bit more streamable and added commands to its scripting language to allow accessing and managing of Internet resources. Compared to Flash, Director's scripting language allows for more interactivity than Flash's ActionScript, which gives Director the tools design better Web-games. Also, Director’s work environment is easier to use, meaning a shorter learning curve for the user. However, because it was a CD-ROM authoring tool, Director includes non-Web functionality that slows down the processing of the shockwave files over the Internet. In addition, Director’s price is a huge deterrent as Director 7 costs $999US, compared to Flash 5’s $299US. [Source: http://hotwired.lycos.com/webmonkey/99/27/index3a_page5.html?tw=multimedia]

Macromedia Flash, on the other hand, was originally and still is designed as a Web-oriented tool. So unlike Director, it does not have non-web-related baggage. Flash uses vectors which makes for the small file sizes, where as Director uses much larger bitmaps. Since Flash main objective is to create web applications, it is designed with streaming in mind, which along with the use of vector graphics, results in presentations that are much more immediate than the Director ones. So, when the user goes to a Flash site, there is little or no waiting for presentations to load up and the transfer of flash files between client and server side seem like a seamless transition. Thus, the efficiency in Flash makes it generally a better tool to create multimedia Web sites, unless the user wants to create online games.

The Future
Although Macromedia Flash has been innovative in the area of Web-authoring and multi-media presentation, such as its emphasize on vectors, it is not a perfect program. However, future versions of Flash will work to address existing problems. Currently, Flash lacks somewhat in the interactivity department. To improve it’s ability to create more dynamic applications such as Web games, future versions of Flash can be given more interactive tools to work with, not just event handling. Also, Flash’s work environment is not the easiest to learn and use. Macromedia can work to improve Flash’s interface to make it’s environment more user-friendly. Along with these enhancements, future versions of Flash will continue to push the boundaries of multi-media authoring and presentation as Macromedia plans to go beyond desktops and start to deliver interactive content to wireless technology such as cell phones and Palm Pilots. Therefore, Flash will continue to achieve greater versatility in creating and presenting graphics and animations as it becomes assessable to different mediums, not just computers and the Internet.
Acknowledgements
Reinhardt, Robert, and Jon Warren Lentz.  Flash 4 Bible.  Foster City: IDG Books
        Worldwide,  Inc., 2000
http://www.brookwood.com/training/flash.htm
http://www.macromedia.com/software/flash
http://www.macromedia.com/software/player_census/flashplayer/
http://hotwired.lycos.com/webmonkey/