Flash Printing versus Browser Printing


Despite all the interactive and exciting ways in which you can use Flash to create powerful multimedia presentations, sometimes it's appropriate to add print functionality to an application. Printing functionality is both useful and appropriate for the following applications:

  • Employee directory

  • Word processor

  • Drawing program

  • Quiz with a results screen at the end

There are three ways to print Flash content:

  • Using the standard web page print option found in all web browsers if the movie is being viewed in a browser window

  • Right-clicking (Ctrl-clicking on a Macintosh) the SWF file being played in the web browser and then selecting the Print option from the context menu that appears. Support for this feature was first officially introduced with the Flash Player 5, although there was limited support in certain versions of the Flash Player 4

  • Having content printed as the result of ActionScript

Let's look at some of the advantages and disadvantages of each option.

Printing from the browser. Most people know how to print with the browser's Print command, but it doesn't give them much control over what's printed. When using this option, everything on the page is typically printed in addition to the desired Flash content, including text, graphics, buttons, banner ads, and any form elements that might be visible. The user ends up printing a bunch of extra distracting stuff that probably has no importance to him or her.

Printing from the context menu. Right-clicking (Ctrl-clicking on a Macintosh) a SWF file and choosing the Print option from the context menu that appears is a better option because it allows the user to focus printing efforts on the content within the SWF file; however, there are a few problems with this option. Users may not know that the context menu option even exists. Also, when printing with this command, only frames on the main Timeline are printed; considering the fact that a Flash movie can contain many Timelines, this restriction is somewhat limiting. And if you can deal with the first two obstacles, be aware that when you print using the context menu Print option, color and transparency effects used in the movie are lost. This could result in a printed page that looks nothing like you expected.

Note

For brevity, we'll assume right-click functionality for the opening of a Flash context menu in the remainder of this lesson. It should be understood that Ctrl-clicking on a Macintosh is the equivalent to right-clicking on a Windows computer.


Printing using ActionScript. Using ActionScript to print from Flash provides much more control over the printing process and the results, making printing Flash content easier and more efficient for the end user.

Using ActionScript, you have the following print capabilities:

  • Print a level or specific movie clip, even if it's not visible

  • Print a specific frame within a level or movie clip

  • Specify the dimensions surrounding the movie clip or level that you want to print

  • Print content as vectors

  • Print content as a bitmap

  • Perform various printing tasks, using various printing options, by opening a single Print dialog box




Macromedia Flash 8 ActionScript Training from the Source
Macromedia Flash 8 ActionScript: Training from the Source
ISBN: 0321336194
EAN: 2147483647
Year: 2007
Pages: 221

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