Understanding the Flash Framework
Introducing the Flash 5 Framework
This language enables Flash 5 to couple with XML (Extensible Markup Language), HTML (Hypertext Markup Language), and other content in many ways. So it’s also a scripting language that’s capable of communication with other parts of the Web. Furthermore, in alliance with Macromedia Generator, Flash 5 is also capable of serving as the front end and graphics engine for the premiere, robust solution for the delivery of dynamic Web content (graphics, charts, sounds, personalized Flash movies) from databases and other back-end resources. A final note to our list of Flash capabilities: Just as this manuscript was going to press, we learned that Macromedia has collaborated with the makers of ColdFusion to create a toolkit that will enable dynamic data-driven Flash interfaces that are based on CFML (ColdFusion Markup Language) or JSP (JavaServer Pages).
So, what’s this hybrid we call Flash capable of? That’s a question that remains to be answered by developers such as you. In fact, we’re hoping that you will master this application and show us a thing or two. That’s why we’ve written this book: to point out the facets of the tool, hoping that you will take the tool in your hands and amaze us and the world!
So, if Flash is a hybrid application, and if this application is capable of just about anything, a good place to start working with this powerhouse is to inquire: What are the components of this hybrid? And if they were separated out, how might their capabilities be described? Those are the questions that we answer here.
In truth, Flash has limited capabilities as an image-editing program. It is more accurate to describe this part of the Flash application as a bitmap handler. Bitmap images are composed of dots on a grid of individual pixels. The location (and color) of each dot must be stored in memory, which makes this a memory-intensive application and leads to large file sizes. However, for photographic-quality images, bitmap formats are indispensable. One more drawback to bitmap images is that they cannot be scaled without adversely affecting the quality (clarity and sharpness). The adverse effects of scaling an image up are more pronounced than when scaling down. Because of these two drawbacks file sizes and scaling limitations bitmaps images are not ideal for Web use.
Much of the Flash application is a vector-based drawing program, with capabilities similar to either Macromedia Freehand or Adobe Illustrator. A vector-based drawing program doesn’t rely upon individual pixels to compose an image. Instead, it draws shapes by defining points that are described by coordinates. Lines that connect these points are called paths, and vectors at each point describe the curvature of the path. Because this scheme is mathematical, there are two distinct advantages: Vector content is significantly more compact, and it’s thoroughly scalable without image degradation. These advantages are especially significant for Web use.
The vector animation component of the Flash application is unlike any other program that preceded it. Although Flash is capable of handling bitmaps, its native file format is vector-based. So, unlike all other animation and media programs, Flash relies on the slim and trim vector format for transmission of your final work. Instead of storing megabytes of pixel information for each frame, Flash stores compact vector descriptions of each frame. Whereas a bitmap-based animation program (such as Apple’s QuickTime) struggles to display each bitmap in rapid succession, Flash quickly renders the vector descriptions as needed and with far less strain on either the bandwidth or the recipient’s machine. This is a huge advantage when transmitting Flash animations and Flash content over the Web.
You might say that the body of Flash is a multimedia-authoring program, or multimedia- authoring environment. It authors movies that can contain multiple kinds of media, such as sound, still graphics, and moving graphics. Yet it is also an interactive multimedia program because it has the capability to assign action commands to the movies that it authors.
Most multimedia-authoring programs have a component for sequencing content as animation, and Flash is no exception. But in Flash, the animation sequencer is the core of the application. The organization of sequences, also known as movies, is as follows:
- The Movie may have any number of scenes, which may be arranged (or rearranged) into a sequence to create a playing order. Scenes play through from first to last (unless Flash’s interactive commands, known as “actions,” dictate otherwise).
- Each scene may contain an unlimited number of layers, which are viewed from front-to-back in the scene. The stacking order of these layers is arranged in the timeline: The topmost layer in the timeline appears at the front of the scene, while the bottom layer is at the back.
- Furthermore, each layer may also have a stacking order of the objects within it. Always at the bottom level are ungrouped vector lines and shapes. Above, in the overlay level, are bitmaps, text, groups, grouped items, and symbol instances. Groups are one or more items that have been selected and “grouped.” Symbol instances may be one or more references to an item that resides in the Library. Any of these items may be moved in front or behind others on that layer without moving them to another layer.
- The units that are responsible for the illusion of time in an animation are frames. Each layer may be composed of a sequence of one or more frames that are controlled by the timeline.
- Finally, there are two basic kinds of frames: static frames and keyframes. Each layer must begin with a keyframe, which may be empty. Static frames simply repeat the content of the prior frame. Keyframes are where content or emptiness is either placed or changed. (Emptiness, or an empty keyframe, functions as a stop frame.) Animation is achieved either by changing the contents on a frame-by-frame basis which is called frame-by-frame animation or by establishing two keyframes and instructing Flash to interpolate the change between them which is called tweening.
Programming interface and database front end
With Flash 4, Macromedia expanded the capabilities of Flash to include limited but powerful programming capabilities that were capable of controlling the nature and quality of Flash interactivity. Furthermore, these capabilities augmented with Generator 2 gave Flash the ability to work as the database front end for sophisticated interactive applications such as online shopping, forms, and other activities not normally associated with an animation program. In fact, there were many ingenious creations that melded code with vector content in ways that no one could have imagined! But that was Flash 4.
Flash 5 has changed all of that in ways that we cannot begin to describe simply because there is little, if any, limitation to what Flash 5 is now capable of. All one need add is a dash of genius, and genius is in good supply among Flash aficionados. What are we talking about? Well, with Flash 5:
- Support for XML was added. You can now send and receive XML data from Flash movies. You can also open live sockets for a constant XML data feed.
- Math operations have been greatly expanded with the Math Object, including common sine, cosine, and tangent methods.
- The color and sound properties of Flash symbols can be controlled with scripting.
- Using Symbol Linkage, Sounds and Movie Clips are now directly accessible from the Library without appearing on the authoring timeline.
Viewing Flash movies
Generally, Flash movies are played back in one of three ways. The most common implementation is for Flash movies to be played back within Web browsers either as part of an HTML page, or as a 100-percent Flash Web page that contains no visible content other than the Flash Movie. Flash movies can also be played through a separate application called the Flash Player. In addition to the Flash Player, Flash movies can also be created as Stand Alone Projectors that facilitate playback without the need for either the player or the browser.
There are several other ways in which Flash movies, or their parts, can be played back or displayed. Since Flash 4, the Publish feature has offered provisions for the export of movies, or sections of movies, to either the QuickTime digital video format, the QuickTime Flash layer vector format, or to the Animated GIF format. Parts of movies can also be exported as a series of individual bitmaps or as vector files. Single frames can also be exported to these formats. Recently, methods were developed that enable Flash content to be used as screensavers