Deciding Which Media Types to Publish

 < Day Day Up > 

Comparing the different media types available in the Publish Settings dialog box's Formats tab is really a case of comparing apples to oranges. You can export a JPG image or you can export a QuickTime movie. The former is a static image, and the latter is a digital video. This encompasses quite a range of options, making a comparison difficult. The only two media types comparable to GIF are JPG and PNG because they are both static image types. Therefore, instead of comparing the media types, the following sections cover each individually.

Publishing Flash (.swf) Files

.swf is the format you'll likely choose every time. It's the reason you're reading this book to make scalable vector animations that play well over the Internet. If there's one disadvantage to using this option, it would be the fact that a few potential users don't have the required (but free) Flash Player.

You'll find some interesting options in the Flash tab (see Figure 24.4) of the Publish Settings dialog box:

  • Load Order affects in what order the layers appear as the movie downloads. Bottom Up, for example, causes the lower layers to become visible first. In reality, many users won't notice a difference with different load orders because they affect just the first frame and become apparent only on slow connections.

  • Generate Size Report exports a text file that contains the same information you learn when using the Bandwidth Profiler, as discussed in Hour 21, "Optimizing a Flash Site." You should recall that when you're testing a movie that includes the Trace action (as you did in Hour 16, "Using ActionScript for Advanced Interactivity"), the output window appears with a message parameter that you provide. Omitting Trace actions won't make any difference if you play the movie in a web browser because Trace has no effect in a browser. The output window will only pop up while you're authoring, so, really, this is more of an authoring preference than a publishing setting.

  • The Protect from Import option prevents others from importing the .swf file into their own Flash files. Keep in mind that the .swf file you post on your website does download to every user's machine (in a folder such as Temporary Internet Files in the Windows folder, for example). In my opinion, the Protect from Import option has limited value. First, when someone imports a .swf file, each frame is imported as a separate keyframe. No ActionScript is retained. Second, just because some users import your file doesn't mean they're allowed to use it. Realize, too, that your .swf is by no means hack-proof. Sensitive data such as passwords should never reside in a movie.

  • The Local playback security option is new to Flash Player 8. It applies only to .swf files that users download and run on their desktops that is, not .swf files posted on a website. When publishing to Flash 8, you have to choose between making a movie that can access only the Internet or only local files (not both). Note this applies only to .swf files the user runs in the Flash Player 8. Also, if you want to make an application that accesses both the Internet and the user's hard drive, you need to make a Projector (which is an .exe), as described later in this hour in the section "Projectors." (You'll find more information about configuring your work environment to deal with this issue in the Flash 8 Security section of Hour 19.)

  • The Compress Movie option is a no-brainer: You should always leave it checked. This compression/decompression routine was added to Flash to reduce the size of .swf files. It has nothing to do with the quality settings on your raster graphics or sounds (as discussed in Hours 3, "Importing Graphics into Flash," 10, "Including Sound in Animations," and 21, "Optimizing a Flash Site"). Basically, everything else, including your scripts, can be compressed (and then seamlessly decompressed on the user's machine). The Compress Movie option is available only when you publish as Flash 6 or later because older Flash players can't decompress these movies.

Figure 24.4. The Flash tab of the Publish Settings dialog box contains all the export settings for the .swf file you're publishing.


The default compression for the raster graphics and audio can be globally specified in the Flash tab of the Publish Settings dialog box (as discussed in Hours 21 and 10, respectively). You can override compression settings made for individual sounds if you check the Override Sound Settings option.

Finally, unlike most publishing settings, which are chosen as the last step, the choice of which version of Flash to export is one you should make early in a project. First of all, you can export Flash version 8, and your movie might play fine in the Flash 7 player; however, any new (previously unsupported) features will fail to execute and lead to unpredictable results. If you're not taking advantage of any Flash 8 only features, your movie will play fine. If you change this setting to, say, Flash 5 and simply use Test Movie, you'll see a report of any unsupported features you've included. This feature is nice because it enables you to fix these problems. However, instead of fixing problems after they're created, you can set the Flash Version option as the first step in a project. This way, as you build, all the unsupported actions will appear in yellow (refer to Figure 24.3).

Publishing HTML Files

Although the HTML tab of the Publish Settings dialog box has been discussed several times already, there's additional information in it that you'll find valuable (see Figure 24.5). First, realize that every setting in this tab (except for Device Fonts) affects only the HTML file. You can always open the HTML file in a text editor and make edits manually. If nothing else, the Publish Settings dialog box gives you a way to learn all the HTML settings that are available. To learn them, all you need to do is look at the corresponding HTML files created.

Figure 24.5. The HTML tab of the Publish Settings dialog box contains a number of options, including which HTML template you want to use.


Normally, users can right-click your movie to display a menu like the one shown in Figure 24.6 (on the Macintosh, they would use control+click). Only a minimized version of this menu will appear for users if you deselect Display Menu in the Playback section of the HTML tab. The menu isn't actually removed; it's just a lot shorter than usual. Keep in mind that the Debugger line appears only for users who happen to have Flash installed.

Figure 24.6. The menu that appears when a user right-clicks your movie, as shown on the left, can be reduced to the version on the right.


The Windows Mode setting applies only to movies viewed in Windows and through Internet Explorer version 4 or later. Although this applies to a large audience, it is limited. Also, the other settings in this drop-down list Opaque Windowless and Transparent Windowless affect only HTML pages that have elements in layers. As if this weren't enough, the performance drops for these options. Feel free to explore these options, but I recommend leaving the default, Window.

Publishing GIF, JPG, and PNG Files

JPG and PNG are both static image formats. GIF has a sister format called animated GIF that is, in fact, an animation format. All three of these formats have their own unique attributes. GIF files always have 256 or fewer discrete colors and tend to be most appropriate for geometric images. JPG is best for photographic or continuous-tone images. JPG can also withstand significant compression with acceptable quality loss. PNG is a high-quality image format that allows for additional types of information to be included. For example, a PNG file created in Macromedia Fireworks has additional options, such as layers and shadow effects. Despite some discussion in the past, PNG hasn't become a web standard. However, when you want to export the best-quality image, PNG is a good choice just don't expect a small file size.

When it comes to web delivery, your decision for static images is between JPG and GIF. Realize that the question about which static format to use arises only when you attempt to deliver an alternative image to users who don't have the Flash Player. For example, every Flash project I've worked on has provided no alternative. The users need the Flash Player; otherwise, they can't see the site it's that simple.

When you want to provide an alternative to users who don't have the Flash Player (as you did in the task "Addressing Users Without Flash"), you need to decide between JPG and GIF. This decision is based on the nature of the image. Remember, though, that it's not the whole movie that's used; it's only one frame of the movie that you get to use for such static formats. Flash will, by default, use the first frame of your movie for any static image format. The movie's first frame, though, could be entirely black. In order to specify a different frame, you simply open the Frame panel and create a label in the chosen frame called #static. It's best to insert a new layer and then a keyframe exactly where you want this label, as shown in Figure 24.7, but this is a relatively simple way to tell Flash which frame to export.

Figure 24.7. Labeling a frame with #static tells Flash you want this frame to be used (instead of Frame 1) when publishing a static image.


After you decide which frame to use, you can decide (based on the contents of that frame) which format to use GIF or JPG. Remember, photorealistic images are best in JPG format, and geometric shapes are best in GIF format.

PNG might seem like a useless format because the files are large and browsers don't really support them, but there is some value. Of course PNG is a great image format to import, as you saw in Hour 3, but here we're talking about exporting. If you want to export the highest quality possible, you should use PNG. There might be several reasons to do this. For instance, even though the options available for exporting a GIF file from Flash are extensive, previewing the effects of every slight change is a tedious process of trial and error. You have to make a change, publish, and then view the results. Frankly, there are better tools for creating GIF files (as well as JPG files, although this is not quite as obvious). Macromedia Fireworks, for example, lets you change all the output options for a GIF file while watching the image quality change (see Figure 24.8). This fact alone might make the extra steps you're about to learn worth the effort. For the most control over the GIF file you're creating, first use Flash to export a 24-bit PNG file (the export options for PNG are shown in Figure 24.9). Then open that PNG file in another image-editing tool (such as Fireworks) and export the GIF file. You can still use Flash's Publish feature to create the GIF and HTML files but you simply replace the GIF file Flash creates with one you create using a more suitable tool.

Figure 24.8. Fireworks is a much better tool than Flash for creating static graphics (such as JPGs).


Figure 24.9. Exporting a PNG file gives you the best-quality static image.


The choice between JPG and GIF might be moot if you want to supply animation to users who don't have the Flash Player. Only GIF has the Animated Playback option (see Figure 24.10). You have several options when creating an animated GIF. Most are self-explanatory. You won't notice, however, an option to specify the first and last frames Flash will simply use the first and last frames of your movie. To override this, just label the frame you want to be used first as #first and the last frame as #last. Also, recall from a previous task that you can let Flash create the HTML image map to be used with your static (or animated) GIF. Flash will create that image map (with all the clickable areas) based on all the buttons that happen to be onscreen in the last frame of your movie. However, you might not have any buttons in the last frame. Just as you can specify which frame is used for static images, you can specify for which frame you want the onscreen buttons to be used in the creation of the image map. Simply label the frame #map. That's it.

Figure 24.10. Of all the traditionally static image formats, only GIF provides the Animated option.


Projectors

If you put your .swf file in a web page, users just need the Flash Player to view it. When you installed Flash, it installed the Flash Player, so you can simply double-click any .swf file on your computer and it will run. If you want to send this file to someone (that is, you don't want to publish it in a web page), you can. The only catch is that the user has to have the Flash Player installed.

Alternatively, you can create a projector, which is a standalone executable. Think of a projector as a modified version of the Flash Player that will play only the .swf file you specify. One way to make a standalone projector is to open a .swf file with the Flash Player (just double-click a .swf file on your computer). Select File, Create a Projector and then name the file you would like to create. That's all there is to it. One catch is that your .swf file grows by nearly 1MB when you convert it to a projector. That's the size of the Flash Player (which you're including in the projector). The other catch is that the projector you just made will run only on the platform you're using (Windows or Macintosh). .swf files work on any platform because the user already has the Flash Player unique to that platform installed. Because projectors have the platform-specific player built in, they can be played only on that platform.

To create a projector for whichever platform you're not using Windows or Macintosh you could repeat the steps just listed on a computer using the target platform. However, you don't have to do this. From the Formats tab of the Publish Settings dialog box, you can specify for which platforms you want the projector made (see Figure 24.11). The projector file that Flash creates can be sent to whomever you want. If you're sending a file from Windows to Macintosh, Flash saves the projector in a compressed and "bin-hexed" format. Bin-hexing is necessary to allow you to send the file to a Macintosh computer via email (or another method). The Macintosh user must decode the bin-hexed file by using software such as Aladdin System's freeware StuffIt Expander for Mac (available at www.aladdinsys.com).

Figure 24.11. Standalone projectors can be exported when you publish for both Macintosh and Windows.


Projectors provide a nice way to use Flash for standalone applications. For example, you might be making a presentation to an audience and want to use Flash to create the "slides." Obviously, you can add a lot of spice to your presentations. The action fscommand is designed for this purpose. The parameters for fscommand include fullscreen, quit, and many others. For example, you can put the action fscommand ("fullscreen", "true") in the very first frame to make your projector fill the screen. Then, in the last frame, you can place a button with the action fscommand ("quit") as a way to exit.

Although it is more difficult to distribute projectors than to simply post to a website, projectors work great for presentations. A lot of people create portfolios of their work that they distribute via CD-ROM. They can include lots of uncompressed audio and high-quality images, for example, and there are no download issues. Just remember that if you use the fullscreen option of fscommand, you need to give your users an obvious Quit button, too.

By the Way: Better Projectors

If you're using a lot of projectors or just want some added features, you really ought to check out the various third-party projector-making tools listed in Appendix B, "Resources." You can add really powerful features above what Flash can do by itself.


QuickTime

You can export a QuickTime video that includes Flash. Don't confuse this with how you imported QuickTime video in Hour 18, "Using Video." There you exported a .swf (that just happened to include video). The Publish Settings QuickTime option lets you create a QuickTime video (that requires the QuickTime player).

Although it's kind of cool how you can add a Flash "layer" (including interactivity) to a QuickTime video, the fact is, Flash video has improved so much that there's little reason to do so. In addition, you're limited to the feature set of Flash 5 or earlier.

     < Day Day Up > 


    Sams Teach Yourself Macromedia Flash 8 in 24 Hours
    Sams Teach Yourself Macromedia Flash 8 in 24 Hours
    ISBN: 0672327546
    EAN: 2147483647
    Year: 2006
    Pages: 235

    Similar book on Amazon

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