beautypg.com

Adobe Flash Professional CC 2014 v.13.0 User Manual

Page 656

background image

are a screen measurement and points are a print measurement. Both pixels and points equal 1/72 of an inch. A twip is 1/20 of a point and pixel.

The following list further illustrates the relationship between units of measure.

1 pixel = 20 twips

1 point = 20 twips

72 pixels = 1 inch

72 points = 1 inch

567 twips = 1 cm

1440 twips = 1 inch

To scale a movie clip before printing, set its MovieClip.xscale and MovieClip.yscale properties before calling this method, and set them back
to their original values afterward. If you scale a movie clip and also pass a value for the printArea property, the pixel values passed to
printAreareflect the original size of the movie clip. That is, if you set a movie clip’s scale to 50% and specify a print area of 500 x 500 pixels,
the content that prints is identical to the content that would print if you didn’t scale the movie clip; however, it prints at half the size. For more
information, see the addPage (PrintJob.addPage method)method of the printjob class in the

ActionScript 2.0 Language Reference

.

Specifying printing as a vector image or bitmap graphic

The options parameter lets you specify whether to print as a vector graphic or bitmap image. When using this optional parameter, use the following
syntax:

{printAsBitmap:boolean}

The default value is false, which represents a request for vector printing. Remember the following suggestions when determining which value to
use:

If the content that you’re printing includes a bitmap image, specify that the print job print as a bitmap to include any transparency and color
effects.

Conversely, if the content does not include bitmap images, specify that the print job print as vector graphics to take advantage of the higher
image quality.

Specifying a frame to print

The frameNum parameter lets you specify a frame to print. If you do not specify a frame number parameter, by default the current frame of the
target or level that you specify as the first parameter when you add a page prints.

Print or delete a print job

1. To send a print job to the printer after using the ActionScript 2.0 addPage() calls, use the PrintJob.send() method, which causes Flash Player

to stop spooling the print job so that the printer starts printing.

2. To delete the print job after you send the print job to a printer, use the delete PrintJob() ActionScript function to delete the PrintJob object,

which frees memory.

Printing frames independent of the PrintJob class

The ActionScript 2.0 PrintJob class, available for Flash Player 7 and later, offers many advantages over the print() and printAsBitmap() methods
for printing. However, to print targeting Flash Player 6 and earlier versions, back to Flash Player 4.0.25 (Windows) and 4.0.20 (Macintosh), use
print() and printAsBitmap() functions and frame labels.

To set up printing from Flash Player independent of the PrintJob class, specify frames to print and set their print area.

Specifying a print area when not using the PrintJob object

By default, when frames are printed, the document file’s Stage determines the print area. Any object that extends off the Stage is clipped and
does not print. Loaded movies use their own Stage size for the print area, not the main SWF file’s Stage size.

As an alternative to using a document’s Stage size, set the following print areas:

For either the Flash Player context menu or the ActionScript 2.0 print() function, designate the bounding box for SWF content as the print
area for all frames by selecting an object in one frame as the bounding box. This option is useful, for example, to print a full-page data sheet
from a web banner.

The print() function lets you use the composite bounding box of all printable frames in a Timeline as the print area—for example, to print
multiple frames that share a registration point. To use the composite bounding box, use the bMax parameter, as shown in the following
example:

print ("myMovie", "bmax")

The print() function lets you change the print area for each frame, scaling objects to fit the print area—for example, to have objects of

649