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 would be both useful and appropriate for the following applications:
There are three ways to print Flash content:
Let's look at some of the advantages and disadvantages of each option.
Most people know how to print with the browser's Print command, but it doesn't give them much control of what's printed. Typically, when using this option, everything on the page is printed in addition to the desired Flash content. This includes text, graphics, buttons, banner ads, and any form elements that may be visible. The user ends up printing a bunch of extra, distracting stuff that probably has no importance to him or her.
Right-clicking (Control-clicking on a Macintosh) an SWF 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 time line 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.
For brevity, for the remainder of this lesson we'll assume right-click functionality for the opening of a Flash context menu. It should be understood that Control-clicking on a Macintosh is the equivalent to right-clicking on a Windows computer.
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: