Macromedia Flash8 Bible

The Publish Settings command (File ð Publish Settings) is used to determine which file formats are exported when the File ð Publish command is invoked. By default, new Flash documents created with Flash 8 use Publish Settings that will export a Flash movie file (.swf) and an HTML file with the proper markup tags to utilize the Flash Player 8 plug-in or ActiveX Control. If you want to customize the settings of the exported file types, you should familiarize yourself with the Publish Settings before you attempt to use the Publish command.

Tip 

The Publish Settings dialog box has many new features that were introduced in Flash MX 2004, with some updates in Flash 8. You should be aware that the default ActionScript language version is AS2.0 for new Flash documents. You learn more about ActionScript and the implications of ActionScript 2.0 in Part VII, "Approaching ActionScript."

Selecting Formats

Choose File ð Publish Settings to access the Publish Settings dialog box, which is nearly identical for both the Windows and Macintosh versions of Flash 8. The dialog box opens to the Formats tab, which has check boxes to select the formats in which your Flash document will be published (see Figure 21-3). For each Type that is checked, a tab appears in the Publish Settings dialog box (with the exception of the Windows and Mac projector options). Click each type's tab to specify settings to control the particulars of the movie or file that will be generated in that format.

Figure 21-3: The Formats tab of the Publish Settings dialog box enables you to select the published file formats and use default or custom names for these published files.

If you click the Use Default Names button, all of the File fields fill in with the name of your Flash document, followed by the file format's suffix. For example, if your movie is named sample.fla and you click the Use Default Names button, this is the base from which the names are generated in publishing. Thus, sample.swf, sample.html, sample.gif, and so on would result.

Tip 

You can enter nonversion-specific filenames for Flash documents that you incrementally save as you work. For example, if you have a Flash document named main_100.fla, set the Flash movie filename to main.swf, and then every new Flash document version you save (for example, main_101.fla, main_102.fla, and so on) will still produce a main.swf file. This way, you can consistently refer to one Flash movie file (.swf) in your HTML code and incrementally save your Flash documents. However, if you work on large Flash projects with a team of Flash designers and developers, you should consider using version control software, such as CSV or Microsoft SourceSafe. With version control software, you don't need to resave files with new names; rather, you check in your changes to the version control system, which keeps track of each file version. We briefly discuss version control in Chapter 3, "Planning Flash Projects."

Tip 

You can specify which folder a publish document is created and stored in. All of the file formats have a folder icon to the right of the File field. If you click the folder icon, you can browse to a specific location where your published file will be created. You can use relative or absolute paths with the filenames in the Formats tab.

Using the Flash Settings

The primary and default publishing format of Flash 8 documents is the Flash movie .swf format. Only Flash movies retain full support for Flash actions and animations. To control the settings for the Flash movie, choose the Flash tab of the Publish Settings dialog box, as shown in Figure 21-4.

Figure 21-4: The Flash tab of the Publish Settings dialog box controls the settings for a movie published in the Flash format.

Here are your options in the Flash tab:

When you are finished entering the settings for the Flash movie, you can proceed to other file type settings in the Publish Settings dialog box. Or you can click OK to return to the authoring environment of Flash 8 so that you can use the newly entered settings in the Test Movie or Scene environment. You can also export a Flash movie (and other file formats currently selected in Publish Settings) by clicking the Publish button in the Publish Settings dialog box.

New Flash Lite Authoring Features in Flash Professional 8, by Ezra Freedman

Macromedia's determination to make Flash Lite a dominant technology for mobile interfaces, applications, and content delivery is clear. In 2005, Macromedia and Nokia (the world's largest handset manufacturer) announced a licensing agreement that will integrate Flash Lite technology into Nokia products. Also in 2005, Macromedia announced the next release of Flash Lite, code named Deuce, which will (among other improvements) be based on the Flash 7 scripting engine and will support ActionScript 2.0. (The current version of Flash Lite, Flash Lite 1.1, is based on the Flash 4 scripting engine and thus requires developers to program using the now antiquated Flash 4 syntax and control structures.)

Flash Lite authoring is only supported in Flash Professional 8. In this version, Macromedia has addressed some of the most significant shortcomings of Flash Lite authoring in Flash MX 2004. In this tutorial, we will introduce the new device document templates and the new Flash Lite Emulator.

Device document templates

In Flash Professional 8, Macromedia has revamped the implementation of Flash Lite document templates. Instead of being tied to a single device, templates are now specific to a class of devices that share key features. The selection of a device template not only loads the appropriate settings for the class of devices, but preselects the appropriate devices for the Test Device menu in the Flash Lite Emulator, which we will discuss in detail later in this section.

To create a new document based on one of the device document templates, choose File ð New (or command+N) to bring up the New Document dialog box. Select the Templates tab. At the time of Flash 8's release, there are three template categories specific to Flash for devices: Global Phones, Japanese Phones, and PDAs. Browse the templates available in each category, and select the appropriate template for your project. If you are unsure of which template to select, the Global Phones ð Flash Lite 1-1 - Symbian Series 60 template is a good place to begin, as this class of device is readily available for purchase and has been a focus of Macromedia's Flash Lite development efforts.

Flash Lite Emulator

When authoring Flash Lite content for Flash MX 2004 Professional, the Test Movie command launched the same test movie screen as for other types of Flash content. This meant (among other things) that you were not able to view the content as it would appear on the device (for example you could not see its relation to the UI design and color scheme of the device). Additionally, you had to utilize the keyboard to simulate button presses, which was not always intuitive. Enter the new Flash Lite Emulator.

Using the Flash Lite Emulator

To launch the Flash Lite Emulator, open an existing Flash Lite document or create a new document based on one of the device document templates and choose Control ð Test Movie (or Command+Enter). The left side of the emulator window is used to select the device you'd like to use for testing. The right side of the emulator window is used to display the movie in the selected device, and enables you to interact with the movie as it would appear and function on the device.

Selecting a Test Device

If you created your Flash Lite movie from one of the new device document templates, the Test Device menu will be prepopulated with the appropriate list of supported devices, as shown in Figure 21-5.

Figure 21-5: The Test Device menu, prepopulated with supported devices for the Flash Lite 1.1 Symbian Series 60 device template.

If you have not yet set a default list of devices and you opened a Flash Lite movie that was created with Flash MX 2004 Professional, or you created the Flash Lite movie by modifying your document's Publish Settings manually to specify Flash Lite 1.0 or Flash Lite 1.1 as the version, the Test Device menu will display "<None Selected>".

Tip 

When authoring Flash Lite content with Flash Professional 8, always create new movies by selecting a device document template — this eliminates the guesswork involved in selecting appropriate target devices.

Testing the movie

Each time you select a new device in the Test Device menu, the Flash Lite movie will load into the right-hand side of the emulator. You can interact with the movie either by using the corresponding keys on your keyboard, or by clicking on the keys themselves in the device skin pictured around the movie.

SWF information

As shown in Figure 21-6, the SWF information area displays the dimensions and file size of your movie. This area is also used to inform you when the dimensions of the movie you have loaded are not consistent with the dimensions of the target device's screen.

Figure 21-6: The SWF information area when the dimensions of the movie loaded are inconsistent with the selected device's screen.

Output options

The Flash Lite Emulator offers three options for output. These options control which types of messages appear in the Output pane while you are testing your Flash Lite movie. Note that these options do not in any way affect the published file.

Trace

The trace check box (enabled by default) specifies whether or not the text specified in trace() actions is displayed in the Output pane. This option is especially useful if you have used trace() messages extensively for debugging your project. Turning the option on and off can serve as a method of enabling or disabling your debug messages.

Tip 

The Flash Lite Emulator does not offer the debug options that are often utilized in the standard test movie window. For this reason, consider using trace() options more frequently in your Flash Lite movie to keep track of variable assignments and function calls.

Tip 

When you are ready to publish your Flash Lite movies for delivery to a device, ensure that the "Omit trace actions" check box in the Flash tab of the Publish Settings dialog is disabled. This will help to optimize the file size of your movie.

Information

Although the Information check box is disabled by default, it is useful to keep this check box enabled. When enabled, key information regarding the selected device's capabilities is printed to the output pane immediately after the movie loads. This will help you determine, for example, whether or not the targeted device supports input text fields.

Warnings

The Warnings check box (enabled by default) specifies whether or not Flash Lite warnings are displayed in the Output pane. For a comprehensive list of warning messages and their meanings, view Appendix C (titled "Warning and Error Messages") of the Macromedia Flash Lite 1.1 Authoring Guidelines document. This document is available as part of the free Flash Lite 1.1 CDK (Content Development Kit), which is available for download at www.macromedia.com/devnet/devices/development_kits.html.

Device Settings dialog box

You can modify the list of devices in the Test Device menu through the Device Settings dialog box (another new feature for Flash Professional 8), shown in Figure 21-7. To launch the Device Settings dialog from the Flash Lite emulator, select the Device Settings option in the Test Devices menu.

Figure 21-7: The Device Settings dialog box can be launched from the main document editing window's document pane.

Once you have launched the Device Settings dialog box, the first step in determining the appropriate devices for your project is ensuring that the appropriate content type is selected. Flash Professional 8 ships with information for 22 Flash Lite content types. Each content type (also referred to as an application mode) refers to a manner in which a device can play Flash content. For example, some devices can support Flash content as a screensaver — for this reason, Screensaver is listed as a content type. If you are uncertain which content type is appropriate for your project, you should select Standalone Player. The Standalone Player mode supports the widest range of Flash Lite features, and is the standard method used to deploy Flash Lite content.

Note 

As you modify your selection for content type, you will see that certain folders on the Available devices list become highlighted (tinted blue) while others are grayed out. The Device Settings dialog box highlights only those folders that contain devices applicable to your selected content type. As you drill down into the top-level folders, you will see that subfolders (and even the devices themselves) also adhere to this convention.

Once you have selected your target Content Type, you are ready to add devices to the Test Devices list. You can add the devices one at a time (by drilling down to and selecting the device in the available devices list and clicking Add >>) or in groups (selecting a folder in the available devices list and clicking Add >> will add all devices in that folder and its subfolders).

Note that Flash 8 allows you to add devices to the Test Devices list even if they do not support the selected Content Type. You can identify those devices in your Test Devices list that are not supported given the current content type by the absence of a width and height value in the available devices list. Additionally, selecting an unsupported device will cause the Available Stage information area to read "Not supported for the selected content type."

When you are satisfied with your selections, click OK to close the dialog box. You can also click Make Default before clicking OK. If you do, the currently selected content type and Test Devices list will be used as a default when you create new Flash Lite movies that are not already associated with a content type and Test Devices list.

Tip 

You should periodically check the Macromedia Web site for new supported devices, as the list of supported devices is expected to grow rapidly. You can access the device profile updates page by clicking on the Check for new devices link located in the lower-left corner of the Device Settings dialog box.

Using the HTML Settings

HTML is the language in which most Web pages are written. The HTML tab of the Publish Settings dialog box (see Figure 21-8) has a number of settings that control the way in which Flash 8 publishes a movie into a complete Web page with HTML tags specifying the Flash Player.

Figure 21-8: The HTML tab controls flexible Flash movie options — you can change these options without permanently affecting the Flash movie.

The settings available in the HTML tab include

Using the GIF Settings

The Graphics Interchange File (GIF) format, developed by CompuServe, defined the first generation of Web graphics and is still quite popular today, despite its 256-color limitation. In the context of the Publish Settings of Flash 8, the GIF format is used to export a static or animated image that can be used in place of the Flash movie if the Flash Player or plug-in is not installed. Although the Flash and HTML tabs are specific to Flash movie display and playback, the settings of the GIF tab (see Figure 21-9) control the characteristics of a GIF animation (or still image) that Flash 8 will publish.

Figure 21-9: You can finesse every subtle aspect of a GIF animation or still image with these settings of the GIF tab of the Publish Settings dialog box.

The settings in the GIF tab include the following:

Using the JPEG Settings

The Joint Photographic Experts Group (JPEG) format is just as popular as the GIF format on the Web. Unlike GIF images, however, JPEG images can use much more than 256 colors. In fact, JPEG files must be 24-bit color (or full-color RGB) images. Although GIF files use lossless compression (within the actual file itself), JPEG images use lossy compression, which means that color information is discarded in order to save file space. However, JPEG compression is very good. Even at its lowest quality settings, JPEG images can preserve quite a bit of detail in photographic images.

Another significant difference between GIF and JPEG is that GIF images do not require nearly as much memory (for equivalent image dimensions) as JPEG images do. You need to remember that JPEG images "uncompress" when they are downloaded to your computer. While the file sizes may be small initially, they still open as full-color images in the computer's memory. For example, even though you may get the file size of a 400-x-300-pixel JPEG image down to 10 KB, it still requires nearly 352 KB in memory when it is opened or displayed.

Flash publishes the first frame of the Flash movie as the JPEG image, unless a #Static frame label is given to another frame in the Flash movie. The limited settings of the JPEG tab of the Publish Settings dialog box (see Figure 21-10) control the few variables of this still photoquality image format:

Figure 21-10: The settings of the JPEG tab are limited because JPEGs are still images with relatively few variables to address.

Using the PNG Settings

The Portable Network Graphic (PNG) format is another still-image format. The PNG specification was developed in 1996 by the W3C (World Wide Web Consortium), and the format is an improvement over both the GIF and JPEG formats in several ways. Much like JPEG, it is excellent for transmission of photographic quality images. The primary advantages of PNG are variable bit-depths (images can be 256 colors or millions of colors), multilevel transparency, and lossless compression. However, some browsers do not offer full support for all PNG options without some kind of additional plug-in. When in doubt, test your PNG images in your preferred browser.

The settings of the PNG tab (see Figure 21-11) control the characteristics of the PNG image that Flash will publish.

Figure 21-11: The settings found on the PNG tab closely resemble those on the GIF tab. The PNG was engineered to have many of the advantages of both the GIF and JPEG formats.

The PNG tab options are

Creating Windows and Macintosh Projectors

To export a Mac stand-alone projector, check the Macintosh Projector option in the Formats tab. To publish a Windows stand-alone projector, check the Windows Projector option in the Formats tab.

Note 

The Mac Projector published by Flash 8 is designed for playback on Mac OS X (10.1) and higher. If you want to publish a projector compatible with Mac OS 9.x or earlier, you'll need to use Flash MX 2004 or earlier.

Using the QuickTime Settings

Apple QuickTime 4 or higher includes built-in support for Flash tracks and .swf files. As such, you may want to publish QuickTime movie files (.mov) in addition to your Flash movies. If you want to enable QuickTime movie output via the Publish command, make sure that it is selected in the Formats tab of the Publish Settings dialog box.

Web Reference 

The QuickTime Publish Settings are discussed at length in an online PDF, "Working with QuickTime." This content, found in previous editions of the Flash Bible, has been moved to an online-only location. You can download the PDF file at www.flashsupport.com/archive.

Категории