Publish Settings


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.

image from book
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.

image from book
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:

  • Version: This drop-down menu provides the option to publish movies in any of the Flash movie formats. To ensure complete compatibility with all of the new Flash 8 features, select Flash Player 8. If you haven't used any Flash 5, MX, MX 2004, or 8-specific ActionScript commands, you can use Flash 4. Flash 1 and 2 support only basic animation and interactive functions. Flash 3 supports just about all animation and artwork created in Flash 8, but it doesn't recognize any actions introduced with either Flash 4 or 5, editable text fields (such as form elements), or MP3 audio. If in doubt, you should test your choice of version in that version's Flash Player.

    Tip 

    Flash Professional 8 has a Flash Lite 1.0 and Flash Lite 1.1 option in the Version menu. Flash Lite 1.0/1.1 is a new Flash Player shipping with some mobile phones, such as DoCoMo phones in Japan. If this option is selected, make sure you are using a Stage size that is compatible with the screen size of the mobile handset on which the movie will be deployed. There are several templates available for devices in the Global Phones, Japanese Phones, and PDA categories of the Template tab of the File ð New dialog box.

  • Load order: This option determines how the Flash Player will draw the first frame of the Flash movie as it is downloaded to the plug-in or player. When Bottom up (the default) is chosen, the layers load in ascending order: The lowest layer displays first, then the second lowest, and so on, until all of the layers for the first frame have been displayed. When Top down is selected, the layers load in descending order: The topmost layer displays first, then the layer underneath it, and so on. Again, this option affects the display of only the first frame of a Flash movie. If the content of the first frame is downloaded or streamed quickly, you probably won't notice the Load Order's effect.

    Note 

    Load Order does not affect the order of actions spread across layers for the same frame. ActionScript will always execute in a top-down fashion; the actions on the topmost layers will execute before actions on lower layers.

  • ActionScript version: This option introduced in Flash MX 2004 controls how ActionScript is compiled in a Flash movie file (.swf). You can choose ActionScript 1.0 or ActionScript 2.0. By default, ActionScript 2.0 is selected. Only use ActionScript 2.0 if you use the new ActionScript 2.0 coding features introduced with Flash MX 2004, or if you use components that ship with Flash 8, such as the FLVPlayback component or the UI components. If you code ActionScript the same way that you did in Flash MX or Flash 5, then choose ActionScript 1.0.

    Tip 

    Flash 8 can compile ActionScript 2.0 code so that it is compatible with Flash Player 6. If you choose ActionScript 2.0 and set the Version menu to Flash Player 6, Flash 8 automatically compiles ActionScript 2.0 in a format that Flash Player 6 understands.

    Also, keep in mind that ActionScript 1.0 or 2.0 code is case-sensitive if it is published for Flash Player 7 or higher. In Flash Player 7 or higher movies, variables, instance names, and other terms in ActionScript are case-sensitive. For example, if you accidentally refer to a variable named myName as myname, Flash Player 7-compiled movies will not be as forgiving as Flash Player 6-compiled movies.

  • Generate size report: As we discussed earlier in this chapter, the size report for a Flash movie can be very useful in pinpointing problematic bandwidth-intensive elements, such as font characters. When this option is checked, the Publish command exports a text (.txt) file. You can view this document separately in a text-editor application such as Notepad or BBEdit.

  • Protect from import: This option safeguards your Flash movies on the Internet. When enabled, the .swf file cannot be imported into the Flash 8 authoring environment or altered.

    Caution 

    The Protect from import option will not prevent a Web browser from caching your .swf files. Also, Macromedia Director can import and use protected Flash movies. Flash utilities such as .swf Decompiler from www.sothink.com can break into any .swf file and extract artwork, symbols, video clips, and sounds. There's even an application called ActionScript Viewer from www.buraks.com/asv that can extract ActionScript from your .swf files! For this reason, you should always use server-side scripts to verify sensitive data such as password entries in Flash movies, rather than internal ActionScripted password checking with if/else conditions. Don't store sensitive information such as passwords in your source files!

  • Omit trace actions: If this option is selected, Flash 8 removes any trace() actions used in your Flash document's ActionScript code. trace() actions will open the Output panel in Test Movie mode for debugging purposes. In general, if you used trace() actions, you will want to omit them from the final Flash movie — they can't be viewed from the standard version of the Flash Player anyway. trace() actions add to the final Flash movie (.swf) file size. For final production and live deployment, you should enable the Omit trace actions option to reduce the overall file size.

  • Debugging permitted: If this option is selected, you can access the Debugger panel from within the Debug Movie environment, or from a Web browser that is using the Flash Debug Player plug-in or ActiveX control. To install the Flash Debug Player plug-in or ActiveX control, go to the Players folder in your Macromedia Flash 8 application folder. There, you will find a Debug folder. With your browser applications closed, run one (or more) of the following files:

    • Install Flash Player 8.msi to install the ActiveX control for Internet Explorer on Windows 98/ME/2000/XP.

    • Install Flash Player 8 Plugin.msi to install the plug-in for Mozilla-compatible browsers such as Firefox or Netscape on Windows 95/98/ME/NT/2000/XP.

    • Install Flash Player 8 OSX to install the plug-in for Mozilla-compatible browsers such as Apple Safari or Mozilla Firefox on Macs running OS X 10.1 or greater.

  • Compress movie: This option compresses Flash Player 6 or higher movies only. When enabled, this compression feature will greatly reduce the size of text or ActionScript-heavy Flash movies. However, you may see little or no size difference on other Flash elements, such as artwork and sounds. Compression cannot be used on Flash Player 5 or earlier movies.

  • Optimize for Flash Player 6 r65: If you decide to publish your Flash movie for Flash Player 6, you can select this check box to further optimize the .swf file. The r65 release of Flash Player 6 introduced enhancements for Flash movie playback that were not available in prior releases of Flash Player 6.

    Note 

    If you select the Optimize for Flash Player 6 r65 option, Flash 8 prompts you with a warning dialog box when you publish the Flash movie. If you use this option, you should use the updated version detection features in the Publish Settings' HTML tab to ensure that visitors trying to view the movie will be redirected to the proper plug-in download page if they are using an earlier version of the player. Specifically, you should enter 6.0.65 in the Version fields of the Publish Settings' HTML tab.

  • Password: If you selected the Debugging permitted option, you can enter a password to access the Debugger panel. Because you can debug movies over a live Internet connection, you should always enter a password here if you intend to debug a remote Flash movie. If you leave this field empty and check the Debugging permitted option, Flash 8 will still prompt you for a password when you attempt to access the Debugger panel remotely. Simply press the Enter key when this prompt appears if you left this field blank.

  • JPEG quality: This slider and text-field option specifies the level of Joint Photographic Experts Group (JPEG) compression applied to bitmapped artwork in the Flash movie. The value can be any value between (and including) 0 to 100. Higher values apply less compression and preserve more information of the original bitmap, whereas lower values apply more compression and keep less information. The value entered here applies to all bitmaps that enable the Use document default quality option, found in the Bitmap Properties dialog box for each bitmap in the document's Library panel. Unlike the audio settings discussed in a moment, no "override" option exists to disregard settings in the Library.

  • Audio stream: This option displays the current audio compression scheme for Stream audio. By clicking the Set button (see Figure 21-4), you can control the compression applied to any sounds that use the Stream Sync setting in the Sound area of the Property inspector (when a sound keyframe has focus). Like the JPEG quality option discussed previously, this compression value is applied to any Stream sounds that use the Default compression in the Export Settings section of each audio file's Sound Properties dialog box in the document's Library. See Chapter 15, "Adding Sound," for more information on using Stream sounds and audio compression schemes.

  • Audio event: This setting behaves exactly the same as the Audio Stream option, except that this compression setting applies to Default compression-enabled Event sounds. See Chapter 15, "Adding Sound," for more information on Event sounds.

    Tip 

    Flash 8 supports imported MP3 audio that uses Variable Bit Rate (VBR) compression. However, Flash cannot compress native sounds in VBR. If you use any imported MP3 audio for Stream Sync audio, Flash will recompress the MP3 audio on export.

  • Override sound settings: If you want the settings for Audio stream and Audio event to apply to all Stream and Event sounds, respectively, and to disregard any unique compression schemes specified in the document's Library, check this option. This is useful for creating multiple .swf file versions of the Flash movie (hi-fi, lo-fi, and so on) and enabling the Web visitor to decide which one to download.

  • Export device sounds: If you are using Flash Professional 8, you have the option of exporting device sounds with your Flash movie. You use this option only if you are using the Flash Lite 1.0 or Flash Lite 1.1 option in the Version menu. To learn more about the use of this feature, use the search phrase "device sound" in the Help panel (Help ð Help) in Flash Pro 8.

  • Local playback security: The new feature in Flash 8 enables you to control the access to local or networked assets from the published Flash movie. In prior releases of the Flash Player, a Flash movie file (.swf) could potentially access local files, representing a security hole. A Flash movie, for example, had the capability to load text files on the local computer and transmit the contents of that file to a remote server. Now, local Flash files are able to accept data from both local and network sources. However, if you choose to send data to a network source, you are only able to receive from a network source, with no data available locally. For more information on this feature, search the Help panel in Flash 8 with the term "local playback security." Note that a Flash projector can potentially read local files and transmit information to other networks.

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.

image from book

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.

image from book
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.

image from book
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.

image from book
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.

image from book

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.

image from book
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

  • Template: Perhaps the most important (and versatile) feature of all Publish Settings, the Template setting enables you to select a predefined set of HTML tags to display your Flash movies. To view the description of each template, click the Info button to the right of the drop-down list (shown in Figure 21-8). All templates use the same options listed in the HTML tab — the template simply places the values of those settings into HTML tags scripted in the template. You can also create your own custom templates for your own unique implementation of Flash movies.

    You can view the "source" of each template in the HTML folder found inside the en/FirstRun/HTML folder (Windows) or the First Run/HTML folder (Mac) of the Flash 8 application folder. These template files have .html extensions, and you can use Macromedia Dreamweaver, Notepad (Windows), or TextEdit (Mac) to view and edit the files. All of the preinstalled templates include HTML tags to create an entire Web page, complete with <head>, <title>, and <body> tags. The following templates are available in the HTML tab:

    • Flash For Pocket PC 2003: With this template, Flash creates an HTML document that can display the Flash movie within the Pocket IE application running on a Pocket PC. This template also creates the necessary tags to display the same Flash movie in the regular desktop versions of Internet Explorer and Netscape. At the time of this writing, Flash Player 6 was the latest public release available for the Pocket PC.

      Note 

      If you are designing Flash movies for the Pocket PC, be sure to check out the PDA document templates. Choose File ð New, click the Templates tab, and choose the PDA category. The Windows Mobile templates work with the screen dimensions of most Pocket PCs.

    • Flash HTTPS: This template looks nearly identical to the Flash Only template (discussed next). The only difference with this template is that the download locations for the ActiveX control and plug-in page use https:// instead of http://. If you are loading your Flash movie file (.swf) from a secure URL and page, it's recommended that any and all URLs used within that document use secure URLs as well. A secure URL always starts with https://.

    • Flash Only: This default template simply inserts the <object> and <embed> tags for a Flash movie. It does not perform any browser or plug-in detection. If the user does not have the Flash Player plug-in or ActiveX control, the browser may produce an error message, a missing plug-in icon, or a prompt to download the latest plug-in or ActiveX control, depending on the browser configuration. The HTML produced by this template may allow an earlier Flash Player (such as Flash Player 4) to attempt playback of your newer Flash movie. Keep in mind that any version of the Flash Player will try to render any Flash movie file. However, you may get unpredictable results when a newer-version Flash movie loads into an older player.

    • Flash with AICC Tracking: Use this template if you are creating Flash movies that incorporate components from the Learning Interactions Library (Window ð Other Panels ð Common Libraries ð Learning Interactions). Use it also if you want the components in the Flash movie to comply with the Aviation Industry CBT Committee (AICC) training guidelines. The template will create JavaScript/VBScript functions that can work with the ActionScript of the learning components. For more information on AICC guidelines, see www.aicc.org. Note that this template will function only in Web browsers that support the fscommand() action from Flash movies.

    • Flash with FSCommand: Use this template if you are using the fscommand() action in your Flash movies to communicate with JavaScript in the HTML page. The fscommand() is discussed in Chapter 22, "Integrating Flash Content with Web Pages." The necessary <object> and <embed> tags from the Flash Only (Default) template are also included.

    • Flash with Named Anchors: If you are using named anchors in the Main Timeline of your Flash document, you will want to use this template for your published HTML document. This template creates the necessary JavaScript to enable the Back button on your Web browser with named anchors within your Flash movie. Named anchors allow you to designate specific keyframes (and scenes) that register in the browser's history when played.

    • Flash with SCORM 1.2 Tracking: This template will create the HTML and JavaScript/VBScript functions to enable communication between Flash movies that use the components from the Learning Interactions Library and the HTML page. SCORM, which stands for Shareable Content Object Reference Model, is a set of guidelines for learning systems created by the U.S. Department of Defense Advanced Distributed Learning (ADL) Initiative. Both SCORM and AICC guidelines aim to promote interoperability among learning and training systems. Note that this template will only function in Web browsers that support the fscommand() from Flash movies.

      • Flash with SCORM 2004 Tracking: This template has the same functionality as the last template, except that the codebase has been updated to support SCORM 2004 features.

    • Image Map: This template does not use or display any Flash movie. Instead, it uses a GIF, JPEG, or PNG image (as specified in the Publish Settings' Format tab) as a client-side image map, via an <img> tag with a USEMAP attribute. Use a frame label of #map in the Flash document file (.fla) to designate which frame is used as the map image. See the section "Using the GIF settings" later in this chapter for more details.

    • QuickTime: This template creates both the <object> and <embed> tags to display QuickTime Flash movies. You need to enable the QuickTime file type in the Publish Settings' Format tab. A QuickTime Flash movie is a special type of QuickTime movie, playable with QuickTime 4 or higher. QuickTime 4 can recognize Flash 3 features only, QuickTime 5 can play Flash 4, and QuickTime 6 can play Flash 5 movies. Be careful to only use ActionScript features that are compatible with each respective version. You must choose Flash Player 3, Flash Player 4, or Flash Player 5 as the Version option in the Flash tab. Depending on the options selected in the QuickTime tab of Publish Settings, the Flash movie may or may not be stored within the QuickTime movie file — it's possible to create a reference .mov file that links to an .swf file, or you can create a .mov file that embeds the .swf file.

      Web Resoure 

      The "Working with QuickTime" chapter, 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.

  • Detect Flash Version: This updated feature of Flash 8 enables you to add version detection to your Flash content. For the most basic use, simply select this check box and leave the default versions. The version displayed in the HTML tab reflects the version of the Flash Player you selected in the Flash tab of the Publish Settings. For more advanced use, you can specify major and minor versions of the currently selected Flash Player version. The Detect Flash Version feature creates all of the necessary JavaScript to detect the Flash Player on modern browsers. The options for this feature include two fields:

    • Minor Revision: This text field controls the minor version revision number you want to require. Note that, to date, there have been no minor revisions to any publicly released Flash Players — Macromedia has only released incremental revisions.

    • Incremental Revision: This text field displays the incremental revision number of the Flash Player you want to require. You can edit this value directly in the dialog box. For example, if you chose the Optimize for Flash Player 6 r65 option in the Flash tab, you could enter the number 65 in this field. The detection script would then check for r65 or higher.

      New Feature 

      The Detect Flash Version feature no longer creates an alternate content page, as it did in Flash MX 2004. With Flash 8, the alternate content HTML is specified in the JavaScript. To include your own custom alternate content, you can edit the JavaScript in Macromedia Dreamweaver or your preferred text editor.

  • Dimensions: This setting controls the width and height values of the <object> and <embed> tags. The dimension settings here do not change the original Flash movie; they simply create the area through which your Flash movie is viewed on the Web page. The way that the Flash movie "fits" into this viewing area is determined with the Scale option (discussed later). Three input areas exist: a drop-down menu and two text fields for width and height. The options here are

    • Match Movie: If you want to keep the same width and height that you specified in the Document Properties dialog box (Modify ð Document), then use this option in the drop-down menu.

    • Pixels: You can change the viewing size (in pixel units) of the Flash movie window by selecting this option and entering new values in the Width and Height text fields.

    • Percent: This option scales the movie to the size of the browser window — or a portion of it. Using a value of 100 on both Width and Height expands the Flash movie to fit the entire browser window. If Percent is used with the proper Scale setting (see the description of the Scale setting later in this chapter), the aspect ratio of your Flash movie will not be distorted.

      Tip 

      The ActionScript Stage class and its supporting methods enable you to disable or override automatic scaling of the Flash movie. For example, the following action added to frame 1 of your Flash movie will disable scaling: Stage.scaleMode = "noScale";. If you want to center your Flash movie's stage in a browser window, you can set the size to Percent in the HTML tab, and the Scale setting to No scale.

    • Width and Height: Enter the values for the Flash movie width and height here. If Match Movie is selected, you shouldn't be able to enter any values. The unit of measurement is determined by selecting either Pixels or Percent from the drop-down menu.

  • Playback: These options control how the Flash movie plays when it is downloaded to the browser. Each of these options has <object> and <embed> attributes if you want to control them outside of Publish Settings. Note that these attributes are not viewable within the Publish Settings dialog box — you need to load the published HTML document into a text editor to see the attributes.

    • Paused at start: This is equivalent to adding a stop() action on the first frame of the first scene in the Flash movie. By default, this option is off — movies play as soon as they stream into the player. A button with a play() action can start the movie, or the Play command can be executed from the Flash Player shortcut menu (by right-clicking or Control+clicking the movie). Attribute: play="true" or "false". If play="true", the movie will play as soon as it is loaded.

    • Loop: This option causes the Flash movie to repeat an infinite number of times. By default, this option is on. If it is not checked, the Flash movie stops on the last frame unless some other ActionScripted event is initiated on the last frame. Attribute: loop="true" or "false".

    • Display menu: This option controls whether the person viewing the Flash movie in the Flash Player environment can access the shortcut menu via a right-click (Windows) or Control+click (Mac) anywhere within the movie area. If this option is selected, the visitor can select Zoom In/Out, 100 percent, Show All, High Quality, Play, Loop, Rewind, Forward, and Back from the menu. If this option is not selected, the visitor can only select About Flash Player from the menu. Attribute: menu=" true" or "false".

    • Device font: This option applies to Flash movies played only in the Windows version of the Flash Player. When enabled, this option replaces fonts that are not installed on the Player's system with anti-aliased system fonts. Attribute: devicefont="true" or "false".

  • Quality: This menu determines how the Flash artwork in a movie will render. While it would be ideal to play all Flash movies at high quality, slower processors may not be able to redraw anti-aliased artwork and keep up with the frame rate. The options for this setting include the following:

    • Low: This setting forces the Flash Player to turn off anti-aliasing (smooth edges) completely. On slower processors, this may improve playback performance. Attribute: quality="low".

    • Auto Low: This setting starts in Low quality mode (no anti-aliasing) but will switch to High quality if the computer's processor can handle the playback speed. Attribute: quality="autolow".

    • Auto High: This setting is the opposite of Auto Low. The Flash Player starts playing the movie in High quality mode, but if the processor cannot handle the playback demands, it switches to Low quality mode. For most Web sites, this is the optimal setting to use because it favors higher quality first. Attribute: quality="autohigh".

    • Medium: This quality produces anti-aliased vector graphics on a 2 x 2 grid (in other words, it will smooth edges over a 4-pixel square area), but it does not smooth bitmap images. Artwork will appear slightly better than the Low quality, but not as smooth as the High setting. Attribute: quality="medium". This quality setting will only work with the Flash Player 5 or higher.

    • High: When this setting is used, the Flash Player dedicates more of the computer's processor to rendering graphics (instead of playback). All vector artwork is anti-aliased on a 4 x 4 grid (16-pixel square area). Bitmaps are smoothed unless they are contained within an animation sequence such as a Motion tween. By default, this setting is selected in the HTML tab of the Publish Settings dialog box. Attribute: quality="high".

    • Best: This mode does everything that High quality does, with the addition of smoothing all bitmaps — regardless of whether they are in Motion tweens. This mode is the most processor-intensive. Attribute: quality="best".

  • Window Mode: The Window Mode setting works only with any version of the Flash ActiveX control on Internet Explorer for Windows 95/98/ME/NT/2000/XP or with Flash Player 6 r65 and higher for Mozilla-compatible browsers on Windows or Mac OS X. If you intend to deliver to one of these browsers and/or this version of the Flash Player, you can animate Flash content on top of DHTML content. One of the following values can be selected from this menu:

    • Window: This is the "standard" player interface, in which the Flash movie plays as it would normally, in its own rectangular window on a Web page. Attribute: wmode="window".

    • Opaque Windowless: Use this option if you want the Flash movie to have an opaque (that is, nontransparent) background and have DHTML or HTML elements behind the Flash movie. Attribute: wmode="opaque".

    • Transparent Windowless: This option "knocks out" the Flash background color so that other HTML and DHTML elements can show through. You have likely seen this type of Flash movie and effect used on several commercial Web sites, where Flash ads animate across the screen on top of the HTML document. Note that the Flash movie's frame rate and performance may suffer on slower machines when this mode is used because the Flash movie needs to composite itself over other non-Flash material. Attribute: wmode="transparent".

  • HTML alignment: This setting works much like the ALIGN attribute of <img> tags in HTML documents, but it's used with the ALIGN attribute of the <OBJECT> and <embed> tags for the Flash movie. Note that these settings may not have any effect when used within a table cell (<td> tag) or a DHTML layer (<div> or <layer> tag). The options for this setting include the following:

    • Default: This option left-justifies the Flash movie in the browser window. If the browser window is smaller than a Flash movie that uses a Pixel or Match Movie dimensions setting (see the Dimensions setting earlier in this section), the Flash movie will be cropped.

    • Left, Right, Top, and Bottom: These options align the Flash movie along the left, right, top, or bottom edge of the browser window, respectively.

  • Scale: This setting works in tandem with the Dimensions setting discussed earlier in this section, and it determines how the Flash movie displays on the HTML page. Just as big-screen movies must be cropped to fit the aspect ratio of a TV screen, Flash movies may need to be modified to fit the area prescribed by the Dimensions setting. The settings for the Scale option include the following:

    • Default (Show all): This option fits the entire Flash movie into the area defined by the Dimensions setting without distorting the original aspect ratio of the Flash movie. However, borders may appear on two sides of the Flash movie. For example, if a 300-x-300-pixel window is specified in Dimensions and the Flash movie has an aspect ratio of 1.33:1 (for example, 400 x 300 pixels), then a border fills the remaining areas on top of and below the Flash movie. This is similar to the "letterbox" effect on widescreen video rentals. Attribute: scale="showall".

    • No border: This option forces the Flash movie to fill the area defined by the Dimensions setting without leaving borders. The Flash movie's aspect ratio is not distorted or stretched. However, this may crop two sides of the Flash movie. Using the same example from Show All, the left and right sides of the Flash movie are cropped when No Border is selected. Attribute: scale="noborder".

    • Exact fit: This option stretches a Flash movie to fill the entire area defined by the Dimensions setting. Using the same example from Show All, the 400 x 300 Flash movie is scrunched to fit a 300 x 300 window. If the original movie showed a perfect circle, it now appears as an oval. Attribute: scale="exactfit".

    • No scale: This option prevents the Flash movie from scaling beyond its original size as defined in the Document Properties dialog box (Modify ð Document). The Flash Player window size (or the Web browser window size) has no effect on the size of the Flash movie. Attribute: scale="noscale".

  • Flash alignment: This setting adjusts the salign attribute of the <object> and <embed> tags for the Flash movie. In contrast to the HTML Alignment setting, Flash alignment works in conjunction with the Scale and Dimensions settings, and determines how a Flash movie is aligned within the Player window. This setting has the following options:

    • Horizontal: These options — Left, Center, and Right — determine whether the Flash movie is horizontally aligned to the left, center, or right of the Dimensions area, respectively. Using the same example from the Scale setting, a 400-x-300-pixel Flash movie (fit into a 300 x 300 Dimension window with scale="nobor der") with a Flash Horizontal Alignment setting of Left crops only the right side of the Flash movie.

    • Vertical: These options — Top, Center, and Bottom — determine whether the Flash movie is vertically aligned to the top, center, or bottom of the Dimensions area, respectively. If the preceding example used a Show All Scale setting and had a Flash Vertical Alignment setting of Top, the border would occur only below the bottom edge of the Flash movie.

  • Show warning messages: This useful feature alerts you to errors during the actual Publish process. For example, if you selected the Image Map template and didn't specify a static GIF, JPEG, or PNG file in the Formats tab, Flash returns an error. By default, this option is enabled. If it is disabled, Flash suppresses any warnings during the Publish process.

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.

image from book
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:

  • Dimensions: This setting has three options: Width, Height, and Match movie. As you might have guessed, Width and Height control the dimensions of the GIF image. These fields are enabled only when the Match movie check box is unchecked. With Match movie checked, the dimensions of the GIF match those of the Flash Movie that is being published.

  • Playback: These radio buttons control what type of GIF image is created and how it plays (if Animated is chosen):

    • Static: If this button is selected, then Flash exports the first frame of the Flash movie as a single still image in the GIF format. If you want to use a frame other than the first frame, use a frame label of #Static on the desired frame. Alternatively, you could use the File ð Export Image command to export a GIF image from whatever frame the Current Frame Indicator is positioned over.

    • Animated: If this button is selected, Flash exports the entire Flash movie as an animated GIF file (in the GIF89a format). If you don't want to export the entire movie as an animated GIF (indeed, a GIF file for a Flash movie with more than 100 frames would most likely be too large to download easily over the Web), you can designate a range of frames to export. Use a frame label of #First on the beginning frame of a given range of frames. Next, add a frame label of #Last to the ending frame of the desired sequence of frames. Flash actually is pretty good at optimizing animated GIFs by saving only areas that change over time in each frame — instead of the entire frame.

    • Loop continuously: When the Animated radio button is selected, you can specify that the animated GIF repeats an infinite number of times by selecting the Loop continuously radio button.

    • Repeat __ times: This option can be used to set up an animated GIF that repeats a given number of times. If you don't want the animated GIF to repeat continuously, enter the number of repetitions here.

  • Options: The options in the Options settings control the creation of the GIF's color table and how the browser displays the GIF:

    • Optimize colors: When you are using any palette type other than Adaptive, this option removes any colors pre-existing in the Web 216 or custom palettes that are not used by the GIF image. Enabling this option can only save you precious bytes used in file overhead — it has no effect on the actual quality of the image. Most images do not use all 216 colors of the Web palette. For example, a black-and-white picture can use only between 3 and 10 colors from the 216-color palette.

    • Interlace: This option makes the GIF image download in incrementing resolutions. As the image downloads, the image becomes sharper with each successive "scan." Using this option is typically a personal preference. Some people like to use it for image maps that can provide basic navigation information before the entire image downloads.

    • Smooth: This option anti-aliases the Flash artwork as it exports to the GIF image. Text may look better when it is anti-aliased, but you may want to test this option for your particular use. If you need to make a transparent GIF, smoothing may produce unsightly edges.

    • Dither solids: This option determines whether solid areas of color (such as fills) are dithered. In this context, this type of dithering would create a two-color pattern to mimic a solid color that doesn't occur in the GIF's color palette. See the discussion of dithering later in this section.

    • Remove gradients: Flash gradients do not translate or display very well in 256 or fewer colors. Use this option to convert all Flash gradients to solid colors. The solid color is determined by the first color prescribed in the gradient. Unless you developed your gradients with this effect in mind, this option may produce undesirable results.

  • Transparent: This setting controls the appearance of the Flash movie background, as well as any Flash artwork that uses alpha settings. Because GIF images support only one level of transparency (that is, the transparent area cannot be anti-aliased), exercise caution when using this setting. The Threshold option is available only if Alpha is selected. The options for this setting include the following:

    • Opaque: This option produces a GIF image with a solid background. The image has a rectangular shape.

    • Transparent: This option makes the Flash movie background appear transparent. If the Smooth option in the Options setting is enabled, Flash artwork may display halos over the background HTML color.

    • Alpha and Threshold: When the Alpha option is selected in the drop-down menu, you can control at what alpha-level Flash artwork becomes transparent by entering a value in the Threshold text field. For example, if you enter 128, all alphas at 50 percent become completely transparent. If you are considering an animated GIF that has Flash artwork fading in or out, you probably want to use the Opaque transparent option. If Alpha and Threshold were used, the fade effect would be lost.

  • Dither: Dithering is the process of emulating a color by juxtaposing two colors in a pattern arrangement. Because GIF images are limited to 256 colors (or fewer), dithering can often produce better-looking images for continuous tone artwork such as gradients. However, Flash's dithering seems to work best with the Web 216 palette. Dithering can increase the file size of a GIF image.

    • None: This option does not apply any dithering to the GIF image.

    • Ordered: This option applies an intermediate level of dithering with minimal file size overhead.

    • Diffusion: This option applies the best level of dithering to the GIF image, but with larger file size overhead. Diffusion dithering only has a noticeable effect when the Web 216 palette is chosen in Palette Type.

  • Palette Type: As we mentioned earlier in this section, GIF images are limited to 256 or fewer colors. However, this grouping of 256 is arbitrary: Any set of 256 (or fewer) colors can be used for a given GIF image. This setting enables you to select predefined sets of colors to use on the GIF image. See Chapter 7, "Applying Color," for more information on the Web color palette. The options for this setting include

    • Web 216: When this option is selected, the GIF image uses colors only from the limited 216 Web color palette. For most Flash artwork, this should produce acceptable results. However, it may not render Flash gradients or photographic bitmaps very well.

    • Adaptive: With this option selected, Flash creates a unique set of 256 colors (or fewer, if specified in the Max colors setting) for the GIF image. However, these adapted colors fall outside of the Web safe color palette. File sizes for adaptive GIFs are larger than Web 216 GIFs, unless few colors are chosen in the Max colors setting. Adaptive GIFs look much better than Web 216 GIFs, but they may not display very well with 8-bit video cards and monitors.

    • Web Snap Adaptive: This option tries to give the GIF image the best of both worlds. Flash converts any colors close to the 216 Web palette to Web safe colors and uses adaptive colors for the rest. This palette produces better results than the Adaptive palette for older display systems that use 8-bit video cards.

    • Custom: When this option is selected, you can specify a palette that uses the ACT file format to be used as the GIF image's palette. Macromedia Fireworks and Adobe Photoshop can export color palettes (or color look-up tables) as ACT files.

  • Max colors: With this setting, you can specify exactly how many colors are in the GIF's color table. This numeric entry field is enabled only when Adaptive or Web Snap Adaptive is selected in the Palette Type drop-down menu.

  • Palette: This text field and the folder browse button are enabled only when Custom is selected in the Palette Type drop-down menu. When enabled, this dialog box is used to locate and load a palette file from the hard drive.

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:

  • Dimensions: This setting behaves the same as the GIF Dimensions setting. Width and Height control the dimensions of the movie. But these fields are enabled only when the Match movie check box is unchecked. With Match movie checked, the dimensions of the JPEG match those of the Flash Movie.

  • Quality: This slider and text field work exactly the same way as the JPEG Quality setting in the Flash tab of Publish Settings. Higher values apply less compression and result in better quality, but they create images with larger file sizes.

  • Progressive: This option is similar to the Interlaced option for GIF images. When enabled, the JPEG image loads in successive scans, becoming sharper with each pass.

image from book
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.

image from book
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

  • Dimensions: This setting works just like the GIF and JPEG equivalents. When Match movie is checked, you cannot alter the Width and Height of the PNG image.

  • Bit depth: This setting controls how many colors are created in the PNG image:

    • 8-bit: In this mode, the PNG image has a maximum color palette of 256 colors, similar to the palette function of GIF images. When this option is selected, the Options, Dither, Palette Type, Max Colors, and Palette settings can be altered.

    • 24-bit: When this option is selected, the PNG image can display any of the 16.7 million RGB colors. This option produces larger files than 8-bit PNG images, but it renders the Flash artwork most faithfully.

    • 24-bit with Alpha: This option adds another 8-bit channel to the 24-bit PNG image for multilevel transparency support. This means that Flash will treat the Flash movie background as a transparent area, so that information behind the PNG image (such as HTML background colors) shows through. Note that, with proper browser support, PNG can render anti-aliased edges on top of other elements, such as HTML background images!

    Note 

    Flash 8's PNG export or publish settings do not reflect the full range of PNG options available. PNG can support transparency in both 8-bit and 24-bit flavors, but Flash enables transparency only in 24-bit with Alpha images.

  • Options: These options behave the same as the equivalent GIF Publish Settings.

  • Dither, Palette Type, Max colors, and Palette: These settings work the same as the equivalent GIF Publish Settings. Because PNG images can be either 8- or 24-bit, these options apply only to 8-bit PNG images. If anything other than 8-bit is selected in the Bit depth setting, these options are disabled. Please refer to the previous section for more information.

  • Filter options: This drop-down menu controls what type of compression sampling or algorithm the PNG image uses. Note that this does not apply an art or graphic "filter effect" as the filters in Adobe Photoshop do, nor does it throw away any image information — all filters are lossless. It simply enables you to be the judge of what kind of compression to use on the image. You need to experiment with each of these filters on your Flash movie image to find the best filter-to-file-size combination. Technically, the filters do not actually look at the pixel data. Rather, they look at the byte data of each pixel. Results vary depending on the image content, but here are some guidelines to keep in mind:

    • None: When this option is selected, no filtering is applied to the image. When no filter is applied, you usually have unnecessarily large file sizes.

    • Sub: This filter works best on images that have repeated information along the horizontal axis. For example, the stripes of a horizontal American flag filter nicely with the sub filter.

    • Up: The opposite of the sub filter, this filter works by looking for repeated information along the vertical axis. The stripes of a vertical American flag filter well with the up filter.

    • Average: Use this option when a mixture of vertical and horizontal information exists. When in doubt, try this filter first.

    • Path: This filter works like an advanced average filter. When in doubt, try this filter after you have experimented with the average filter.

    • Adaptive: This filter provides the most thorough analysis of the image's color and creates the most accurate color palette for the image. However, it usually provides the largest file sizes for the PNG format.

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.




Macromedia Flash 8 Bible
Macromedia Flash8 Bible
ISBN: 0471746762
EAN: 2147483647
Year: 2006
Pages: 395

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net