Chapter 1. Understanding the Flash CS3 Framework

IN THIS CHAPTER

  • Exploring the uses of Flash CS3

  • Identifying Flash file types

  • Introducing the structure of Flash documents

Since its humble beginnings as FutureSplash in 1997, the Flash authoring tool and the Flash platform have matured into a powerful tool for deploying a wide range of media content. With every new version released, the possibilities have increased for imaginative and dynamic content creation — for the Web and beyond. Since Adobe's acquisition of Macromedia in 2005, Adobe has responded to the Web development community's unprecedented embrace of Flash by expanding advanced features and enhancing tools for new users. The Adobe user interface is now consistent from powerhouse applications such as Adobe Photoshop, Adobe Flash, and Adobe Illustrator.

In this chapter, we introduce Flash CS3 and explore the many possibilities that are available for your productions. We also discuss how Flash compares to or enhances other programs that you may be familiar with.

Flash movies are usually viewed in a few different ways. The most common method is from within a Web browser, either as an asset within an HTML page or as a Web site completely comprised of a master Flash movie using several smaller Flash movies as loaded SWF assets. The Flash Player is also available as a stand-alone application (known as a projector), which can be used to view movies without needing a Web browser or the plug-in. This method is commonly used for deployment of Flash movies on CD-ROMs, floppy disks, or other offline media formats.

Note

You can learn more about projectors and stand-alones in Chapter 23, "Using the Flash Player and Projector."

The Key Is Integration

Flash has seen significant development over the years in both capability and design. Consistently with each new release, developers push the technology into new territory. In its current iteration, Flash CS3 enables you to create content that's compatible with the single largest upgrade to the Flash Player's ActionScript engine, also called the ActionScript Virtual Machine (or AVM). There are two sides of the integration coin: design document import and high-end programming with ActionScript 3.0. Flash CS3 continues to satisfy both designers and programmers — all of the new author-time visual effects in Flash 8 and Flash Player 8 are fully programmable with ActionScript, the programming language of Flash.

Flash CS3, also referred to as Flash CS3 Professional, adds several enhancements to Flash 8:

  • One version: You no longer have to worry about which version of Flash to purchase — there's only one version! That's right. Gone is the distinction between Flash Basic and Flash Professional. If you have Flash CS3, you've got access to any feature we discuss in this book (and more!).

  • CS3 Interface: Flash CS3 sports tools and panels that resemble the look-and-feel of other Adobe Creative Suite applications such as a Photoshop and Illustrator. The panels can now be docked or stacked, and panels can be reduced to icon only or icon and text views.

  • Adobe Photoshop and Adobe Illustrator document import: Now that Adobe oversees the development of Photoshop, Illustrator, and Flash, it's much easier to coordinate file format interoperability between the applications. You have more options than ever to faithfully bring Photoshop and Illustrator content into Flash documents.

  • Adobe Device Central CS3: Flash CS3 ships with a new application named Adobe Device Central CS3. This program enables you to set up a Flash, Photoshop, or Illustrator document prepped with the proper screen size and attributes for deployment to a wide range of mobile devices. Presets for manufacturers such as Nokia, Samsung, and Motorola determine the frame size, frame rate, FlashLite (or Flash Player) version, and ActionScript version compatible for each device.

  • Improved motion tweening features: You can now copy motion tween information from one tweened sequence and apply the same tween to one or more objects on the stage. Furthermore, you can copy the tween's settings to ActionScript 3.0 and reuse the sequence entirely in code.

  • Updated components: Adobe rebuilt many of the user interface components from Flash 8, from the ground up. These components use ActionScript 3.0 and smaller in file size than their predecessors. The FLVPlayback component has also been updated to ActionScript 3.0 for use in Flash Player 9 projects.

  • Adobe Flash Video Encoder: Adobe did an excellent job retooling the compression settings and options for the Flash Video Encoder, which is included with Flash CS3. Now you can deinterlace video footage and import and export cue points.

  • Flash Player detection update: Flash CS3 improves the Flash Player detection capabilities in the Publish Settings' HTML tab. Flash CS3 can create one HTML page that detects a target version of the Flash Player and displays the appropriate content.

  • ActionScript 3.0 compiler: You can now write ActionScript 3.0 code for Flash documents that target Flash Player 9. ActionScript 3.0 is a highly advanced method of programming.

  • Script editing: The Actions panel has some new features for easier code editing, such as code collapse and expand (just like Dreamweaver) and block commenting and uncommenting.

Many enhancements are not directly seen in the authoring environment, though. Flash Player 9 adds the following enhancements, among others:

  • Better runtime performance: Adobe has added a new ActionScript Virtual Machine (or AVM) to the Flash Player. Flash Player 9 has two AVMS: AVM1, to run ActionScript 1.0 (AS1) or 2.0 (AS2) content, and AVM2, to run ActionScript 3.0 (AS3) content. Any content that uses AS3 will perform much faster than equivalent code written in ActionScript 2.0.

  • Full screen capability: Flash Player 9 release 28 (or r28) or higher can utilize a full screen mode for Flash content. Now, you can take over the user's screen with full screen presentations, just as you can in the stand-alone player or projector. With this new functionality, you can scale your Flash Video content (or anything in your Flash movie) to the full size of a user's screen.

Tip

If you're targeting a Flash Player 6 audience, you might want to consider targeting Flash Player 9 as well. Why? Flash Player 6 is capable of running Express Install scripts, which enable a Flash movie to automatically update the installed version of the Flash Player. Also, users with Flash Player 7 or higher can receive automatic player updates. By default, Flash Player 7 will check Adobe's site every 30 days for new player updates. This process occurs silently in the background and doesn't require the user to upgrade his or her player installation manually. Theoretically, then, within 30 days of the release of any new Flash Player, including Flash Player 9, most browsers that had Flash Player 7 or 8 will then have Flash Player 9.

For a complete list of features in Flash CS3, see the Help pages in the Help panel's booklet, Using Flash

The Key Is Integration

Adobe also released new versions of Dreamweaver and Fireworks, as part of the CS3 Web Suite software bundle. The user interfaces for Flash, Dreamweaver, and Fireworks are very similar, each touting a Property inspector, dockable panel sets, and specialized tools to integrate the products with one another.

Although the broad array of Flash work created by Web designers and developers already speaks for itself, the sleek interface and the powerful additional features of Flash CS3 surely inspire more challenging, functional, entertaining, informative, bizarre, humorous, beautiful, and fascinating experiments and innovations.

There are more ways to use Flash than there are adjectives to describe them, but here are just a few examples:

  • Forms for collecting user information and dynamically loading custom content based on this interaction

  • Real-time interaction with multiple users on a forum or support site, including live audio/video feeds of connected parties

  • Complex online games with rich graphics and interaction, including multiplayer games

  • A video portfolio using Flash Video capabilities and dynamic loading of content

  • Animated ID spots and loading screens with built-in download detection

  • A practical Web utility, such as a mortgage calculator or a search tool

  • Robust chat rooms based on XML and server-socket technology

  • An audio interface dynamically pulling in requested songs using native Flash 8 support for MP3 loading

  • Interactive conceptual art experimentations involving several users, 3-D, or recording and playback of user interaction

  • Shopping and e-commerce solutions built entirely using Flash and server-side technology

  • Interfaces for kiosks at museums, banks, and shopping centers

  • Alternative content or movie attributes based on system capability testing (if a device or desktop doesn't support audio streaming, then a text equivalent of the audio transcript is presented to the user)

  • Projectors used for creating slide show presentations in the style of PowerPoint, either on CD-ROM or an alternative storage device

  • Broadcast quality cartoons, advertising, or titling

  • Optimized animations for the Web, and for mobile devices such as cell phones or PDAs

  • An interface that addresses accessibility issues by modifying certain elements when a screen reader is active

  • Flash movies specifically exported for use in digital video projects requiring special effects and compositing

This list is obviously far from complete and is ever-expanding with each new release of the program. As you can probably tell from this list, if you can imagine a use for Flash, it can probably be accomplished.

The topography of Flash CS3

Before you attempt to construct interactive projects in Flash, you should be familiar with the structure of the authoring environment. Even if you already know a previous version of Flash, learning this is advisable. That's because with the release of Flash CS3, Adobe has reorganized existing features to the interface and has either moved or improved other features and functionalities. So, to get a firm footing in the new interface, we strongly suggest that you work your way through this book — from the beginning.

Note

Chapter 4, "Interface Fundamentals," introduces the updated Flash CS3 interface and gives you tips for customizing your workspace and optimizing your workflow.

Moreover, you need to proactively plan your interactive projects before you attempt to author them in Flash. An ounce of preplanning goes a long way during the production process. Don't fool yourself — the better your plan looks on paper, the better it performs when it comes to the final execution.

Note

We detail the foundation for planning interactive Flash projects in Chapter 3, "Planning Flash Projects," and you will find these concepts reiterated and expanded in chapters that discuss specific project workflows. Chapter 20, "Making Your First Flash CS3 Project," is a great place to start applying these planning strategies.

We consolidated the overview of interactive planning in the early chapters of the book. In later chapters, we included step-by-step descriptions of real-world projects that allow you to see how all the theory and planning suggestions apply to the development of specific projects.

Note

Chapter 32, "Creating a Game in Flash," walks you through the logic required to design and script a functional and engaging game. Chapter 36, "Building an Image Gallery Component," describes the process of creating an entire component from the ground up, utilizing many of the filter effects available in Flash Player 8 and higher.

There are two primary files that you create during Flash development: Flash document files (.fla) and Flash movie files (.swf). We discuss both of these formats next.

File types in Flash CS3

Flash document files (.fla) are architected to provide an efficient authoring environment for projects of all sizes. Within this environment, content can be organized into scenes, and the ordering of scenes can be rearranged throughout the production cycle. Layers provide easy separation of graphics within each scene, and, as Guide or Mask layers, they can also aid drawing or even provide special effects. The Timeline shows keyframes, motion and shape tweens, labels, and comments. The Library (which can be shared amongst movies at author-time or at runtime) stores all the symbols in your project, such as graphics, fonts, animated elements, sounds or video, and components.

Flash documents

Flash documents

Tip

Flash CS3 allows you to resave your Flash CS3 document file (.fla) as a Flash 8 document file (.fla). Choose File

Flash documents

In Flash CS3, you have the option to create two different types of Flash files: Flash file (ActionScript 2.0) and Flash file (ActionScript 3.0). If you are targeting Flash Player 8 or earlier, you should always choose ActionScript 2.0. If you are targeting Flash Player 9 or higher, and you want to use the advanced coding style of ActionScript 3.0, you should choose Flash file (ActionScript 3.0). You can change your target version of ActionScript and the Flash Player at any time by clicking the Flash tab in the File

Flash documents

Figure 1.1 shows how Flash documents are composed of individual scenes that contain keyframes to describe changes on the Stage. What you can't see in this figure is the efficiency of sharing libraries among several Flash documents, loading other Flash movies into a parent, or "master," Flash movie using the loadMovie() action, or creating interactive elements with scripting methods.

Flash movies

Flash movies

Warning

The Protect from import option in the Publish Settings does not prevent third-party utilities from stripping artwork, symbols, sounds, and ActionScript code from your Flash movies. For more information, read Chapter 21, "Publishing Flash Movies."

Much of the information contained originally within a Flash document file (.fla) is discarded in the attempt to make the smallest file possible when exporting a Flash movie file (.swf). When your movie is exported, all original elements remain but layers are essentially flattened and run on one timeline, in the order that was established in the Flash document. Practically all information originally in the file will be optimized somehow, and any unused Library elements are not exported with the Flash movie. Library assets are loaded into and stored in the first frame they are used in. For optimization, reused assets are only saved to the file once and are referenced throughout the movie from this one area. Bitmap images and sounds can be compressed with a variety of quality settings as well.

Tip

Flash Player 6 and higher movies can be optimized with a specialized Compress Movie option that is available in the Flash tab of the Publish Settings dialog box (File

Flash movies

Note

We discuss Flash Player detection in detail in Chapter 22, "Integrating Flash Content with Web Pages."

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

Elements of a Flash document (.fla) in the authoring environment

Figure 1.1. Elements of a Flash document (.fla) in the authoring environment

Refer to Figure 1.2 for a graphic explanation of the characteristics of the Flash movie file (.swf ) format.

Overview of the Flash movie (.swf) format

Figure 1.2. Overview of the Flash movie (.swf) format

Flash ActionScript files

Flash ActionScript files

Flash Video files

Flash Video files

Flash Debug files

Flash Debug files

Note

You learn more about the debugging process in Chapter 33, "Managing and Troubleshooting Flash Movies."

Note

Flash CS3 does not create SWD files when you debug an ActionScript 3.0 Flash Player 9 movie. Debugging capabilities are now directly accessed from the Flash movie (SWF file) by the Debug version of Flash Player 9.

Flash Component files

Flash Component files
C:Documents and Settings[Your User Name]Local SettingsApplication ;
DataAdobeFlash 8enConfigurationComponents

On the Mac, you can copy to this location:

[Startup disk]: Users: [Your User Name]: Library: Application Support: ;
Adobe: Flash CS3: en: Configuration: Components

These locations are only used to store additional components; the default components for Flash CS3 are stored in the Flash CS3 application folder.

Flash Project files

Flash Project files

The Many Faces of Flash CS3

Flash is a hybrid application that is like no other application. On the immediate surface, it may seem (to some) to be a simple hybrid between a Web-oriented bitmap handler and a vector-drawing program, such as Adobe Illustrator. But while Flash is indeed such a hybrid, it's also capable of much, much more. It's also an interactive multimedia-authoring program and a sophisticated animation program suitable for creating a range of animations — from simple Web ornaments to broadcast-quality cartoons. As if that weren't enough, it's also the host of a powerful and adaptable scripting language.

ActionScript has evolved from a limited drag-and-drop method of enabling animation to a full-fledged object-oriented programming language very similar to JavaScript. Flash ActionScript can work in conjunction with XML (eXtensible Markup Language), HTML, and many other applications and parts of the Web. Flash content can be integrated with server-side technologies, including Flash Remoting and Flash Media Server, and the Flash Player offers built-in support for dynamically loading images, MP3s, movies, and other data. Flash can work seamlessly with ColdFusion, other application servers running PHP, Microsoft .NET services, and XML socket servers to deliver streamlined dynamic interactive experiences.

So, what's this evolving hybrid we call Flash really 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 put the tool in your hands and get you started on the road to your own innovations.

Because Flash is a hybrid application 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 in this chapter.

Bitmap handler

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 format and leads to larger file sizes. Another characteristic of bitmap images is that they cannot be scaled without compromising 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 — bitmap images are not ideal for Web use. However, for photographic-quality images, bitmap formats are indispensable and often produce better image quality and lower file sizes than vector images of equivalent complexity.

Vector-based drawing program

The heart of the Flash application is a vector-based drawing program, with capabilities similar to 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.

Vector-based animator

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 many 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 file format struggles to display each bitmap in rapid succession, the Flash Player 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 animations and other graphic content over the Web.

Video engine

Flash Player 6 and higher include a built-in video engine — the Sorenson Spark codec — which means that the Flash Player plug-in can be considered one of the world's smallest video plug-ins. Flash Player 8 and higher feature an additional video codec, the On2 VP6 codec, which has superior compression and image quality. You can import source video files directly into Flash CS3 document files (.fla), or create separate Flash Video files (.flv) that load into your Flash movies. Users do not need to have Apple QuickTime, Real Network's RealPlayer, or Microsoft Windows Media Player installed in order to view video in a Flash movie. Flash Player 6 and higher provide a seamless solution.

Note

To learn more about this exciting aspect of Flash authoring, refer to Chapter 17, "Displaying Video." We also discuss the Flash Video Encoder and Sorenson Squeeze, applications designed to create the highest-quality Flash video content.

Audio player

Since Flash Player 6, Flash movie files (.swf) have had the capability to load MP3 files during runtime. You can also import other audio file formats into a Flash document file (.fla ) during author-time. Sounds can be attached to keyframes or buttons, for background tracks or sound effects. A sound file's bytes can be distributed evenly across a timeline, so that the .swf file can be progressively downloaded into the Flash Player, enabling a movie to start playing before the entire sound file has been downloaded.

Multimedia authoring program

If the heart of Flash is a vector-based drawing program, then the body of Flash is a multimedia-authoring program (or authoring environment). Flash document files (.fla) can contain multiple media assets, including sound, still graphics, animation, and video. Moreover, Flash is a powerful tool for creating truly interactive content because it enables you to add (ActionScript) commands to dynamically control movie file (.swf) playback. Whether you are designing simple menu systems or customized and intuitive experimental interfaces, Flash content can be authored to recognize and respond to user input.

Animation sequencer

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 author-time application. The Timeline window controls the display of all content — static or animated — within your Flash project. Within the Timeline window, there are two areas that enable you to organize content in visual space and in linear time.

Layers and layer folders enable you to keep track of content that has been placed into your Flash document. The visibility of each layer can be controlled independently, making it easier to isolate specific elements as you are authoring. Layers are viewed from front to back within each frame of the Timeline — items on upper layers overlay other items on lower layers. Any number of items can be placed on a single layer, but you have less control over the stacking order within a layer. Within the same layer, ungrouped vector lines and shapes will always be on the bottom level, whereas bitmaps, text, grouped items, and symbol instances will be on the upper level.

Tip

Flash CS3 documents can use Layer folders. This is invaluable for organizing projects that involve many separate elements.

Note

For a detailed tour of the Flash CS3 environment, refer to Chapter 4, "Interface Fundamentals." We discuss the process of making artwork and managing groups and symbols in Chapter 5, "Drawing in Flash," and in Chapter 6, "Symbols, Instances, and the Library," respectively.

The structure that creates the illusion of movement in a Flash movie is a series of frames. Each frame represents a still moment in time. By controlling how the Playhead moves through these frames, you can control the speed, duration, and order of an animated sequence.

By changing the content in your layers on each frame, you can manually create frame-by-frame animation. However, one of the things that makes Flash such a popular animation machine is its ability to auto-interpolate or tween animation. By defining the content on a beginning and an end keyframe and applying a Motion tween or a Shape tween, you can quickly create or modify animated shape transformations and the movement of elements on the Stage.

Note

We discuss the many ways of creating Flash animation in Part III: "Creating Animation and Effects."

Within one Flash document, you can also set up a series of separate scenes; each scene is a continuation of the same Main Timeline, but scenes can be named and reordered at any time. Scenes play through from first to last without interruption unless Flash's interactive commands ("actions") dictate otherwise.

Note

We introduce the steps for using ActionScript for simple control of movie playback in Part V: "Adding Basic Interactivity to Flash Movies."

Programming and database front end

The past few versions of Flash brought a vast expansion of the possibilities for integrating Flash interfaces with server-side technology and dynamic loading of content using XML and server technologies such as Adobe ColdFusion, PHP, Microsoft .NET, JSP, Flash Remoting, and Adobe Flash Media Server. These improvements largely came out of the development and maturity of ActionScript as a viable programming language. Flash has developed into an alternative front end for large databases, which means it can serve as an online store, MP3 player, or multiuser game and chat room — an amazing feat for an "animation program"!

With Flash CS3 there are virtually infinite possibilities at your fingertips. Using the components that ship with Flash CS3, you can tap advanced data structures and display them in a Flash movie. You can load JPEGs, GIFs, PNGs, MP3s, and Flash Video files into Flash at run time (or "on the fly"), without having to use a special server technology. You can use a wide range of data formats, from XML to Web Services (SOAP) to Flash Remoting.

There are many other enhancements to the programming environment and functionality of Flash that experienced users will appreciate and new users will come to value. ActionScript 3.0 continues the evolution of Flash's scripting language to a mature format, more closely adhering to ECMAScript 4. These changes support ActionScript's move toward acceptance as a standard, object-oriented programming (OOP) language on its own.

Summary

  • Flash CS3 combines many of the key tools for multimedia authoring into one nimble program. The integration it facilitates with other programs and languages promotes better Web content and more advanced applications.

  • Flash content is not only found on the Web. For example, it is also used for CD/DVD-ROM authoring, broadcast graphics, offline interfaces, and business presentations.

  • Flash CS3 is a multifaceted application that can create a wide range of interactive products for the ever-growing variety of Web-enabled devices that surfers use to access the Internet.

  • Careful planning of Flash development will undoubtedly save you time and effort in the long run.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.161.132