Change the printed background color, Use frame labels to disable printing – Adobe Flash Professional CS3 User Manual

Page 469

Advertising
background image

FLASH CS3

User Guide

463

4

Select the frame in the Timeline that contains the shape to use for the bounding box.

5

In the Property inspector (Window > Properties > Properties), enter

#b

for Frame Label to specify the selected

shape as the bounding box for the print area.

Only one #b frame label per Timeline is allowed. This option is the same as selecting the Movie bounding box option
with the Print action.

Using the print() function when not using the PrintJob object

The basic syntax for the ActionScript 2.0

print()

function, which you can associate with a button or other trigger

in your document to activate printing, is as follows:

print (target, “Bounding box”);

The target parameter specifies the location of the frames that print, and the bounding box parameter specifies the
print area.

Assign a

print()

function to a button, frame, or movie clip in your document to let users print Flash content. If you

assign a

print()

function to a frame, the action executes when the playhead reaches the designated frame.

The

print()

function lets you print frames in other movie clips in addition to the main Timeline. Each

print()

function sets only one Timeline for printing, but the action lets you specify any number of frames in the Timeline to
print. If you attach more than one

print()

function to a single button or frame, the Print dialog box appears for

each action executed.

See also “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.

Change the printed background color

You can print the background color set in the Document Properties dialog box. Change the background color for
only the frames to be printed by placing a colored object on the lowest layer of the Timeline being printed.

1

Place a filled shape that covers the Stage on the lowest layer of the Timeline that will print.

2

Select the shape and select Modify > Document. Select a color for the printing background.

This action changes the entire document’s background color, including that of movie clips and loaded SWF files.

3

Do one of the following:

To print that color as the document’s background, designate to print the frame in which you placed the shape.

To maintain a different background color for nonprinting frames, repeat steps 2 and 3. Then place the shape on
the lowest layer of the Timeline, in all the frames that are not designated to print.

Use frame labels to disable printing

To choose not to print any of the frames in the main Timeline, label a frame as !#p to make the entire SWF file
nonprintable. Labeling a frame as !#pdims the Print command in the Flash Player context menu. You can also
remove the Flash Player context menu.

If you disable printing from Flash Player, the user can still use the browser Print command to print frames. Because
this command is a browser feature, you cannot use Flash to control or disable it.

See also

“Publishing overview” on page 419

Advertising