Chapter 14. Printing


In this chapter

  • Controlling print output

  • Avoiding problems with print functionality

  • Optimizing artwork for grayscale printers

  • Printing multiple pages of text

In this chapter, you learn how to manage the printing of Flash content using the flash.printing.PrintJob class. With ActionScript, you can control what portions of your movie are printable, and you can even specify the way those portions print.

Why Print from Flash?

Even though you don't need to print everything, some things are still better printed, such as driving maps (until everyone has mobile devices with GPS units), coupons, and purchase receipts. In this section, you explore some printing features that work with Flash movies.

Most Web browsers simply can't print any plug‐in content. Some browsers print a gray area where the plug‐in content should be, or they leave it empty. Therefore, if you do want to print from the Flash Player plug‐in, you should use ActionScript's PrintJob class to do the work. You'll learn the specifics of the PrintJob class later in this chapter.

It can be difficult to predict how regular HTML Web pages print, even with traditional layouts without plug‐in content. Each browser defines page margins differently, and prints unique header and footer information. Have you ever gone to a Web site that offers driving directions, and printed a map that just barely bled off the edge of the printed version? You can avoid frustrating situations such as this by using the print capabilities ...

Get ActionScript™ 3.0 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.