Printing frames independent of the printjob class, Specify a print area when printing frames – Adobe Flash Professional CS3 User Manual

Page 468

Advertising
background image

FLASH CS3

User Guide

462

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.

Note: For information on printing from SWF files at runtime using ActionScript 3.0, see “Printing” in Programming
ActionScript 3.0.

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 different sizes in each frame fill the printed page. To change the bounding box per
frame, use the Frame parameter in the Print action parameters, as shown in the following example:

print ("myMovie", "bframe")

The

print()

function lets you designate the bounding box of a specific frame in a document as the print area for

all printable frames in the document, as shown in the following example:

print ("myMovie", "bmovie")

You use the frame label #b to designate a frame to be used to designate the print area. The label #b must be on the
same layer as a frame labeled #p.

For more information about

print()

function parameters, see “print function” in the ActionScript 2.0 Language

Reference.

Note: For information on printing from SWF files at runtime using ActionScript 3.0, see “Printing” in Programming
ActionScript 3.0.

Specify a print area when printing frames

1

Open the Flash document (FLA file) containing the frames you will set to print.

2

Select a frame that you have not specified to print with a #p frame label that is on the same layer as a frame labeled #p.

To organize your work, select the next frame after a frame labeled #p.

3

Create a shape on the Stage the size of the desired print area. To use a frame’s bounding box, select a frame with

any object of the appropriate print area size.

Advertising