Adobe 38039336 - Flash CS3 Professional User Manual page 465

User guide
Hide thumbs Also See for 38039336 - Flash CS3 Professional:
Table of Contents

Advertisement

If the user selects an option to begin printing, the
is
if the user cancels the print job, in which case the script should call only
false
method sets values for the
PrintJob.start()
properties.
tation
Depending on the user's operating system, an additional dialog box might appear until spooling is complete and the
function is called: Make calls to
PrintJob.send
seconds elapse between the
the print job to the printer, Flash Player effectively calls
using
PrintJob.addPage()
When a new print job is constructed, the
called, after the user selects the print option in the operating system print dialog box, Flash Player retrieves the print
settings from the operating system. The
Property
Type
number
PrintJob.paper-
Height
number
PrintJob.paper-
Width
number
PrintJob.page-
Height
number
PrintJob.page-
Width
string
PrintJob.orien-
tation
Note: For information on printing from SWF files at runtime using ActionScript 3.0, see "Printing" in Programming
ActionScript 3.0.
Adding pages to a print job
You add pages to your print job with the ActionScript 2.0
include as many as four parameters, the only required parameter is
are
,
, and
printArea
options
If you are not using a particular optional parameter but are using other optional parameters, use
excluded optional parameter.
With all four parameters, the function uses the following syntax:
MyPrintJob.addPage(target[,printArea:Object, options:Object, frameNum:Number]):boolean;
If you provide an invalid parameter, the print job uses default parameter values.
Each call to add a new page is unique, which lets you modify parameters without affecting previously set parameters.
For example, you can specify that one page print as a bitmap image and another page print as a vector graphic. You
can add as many new pages to your print job as the print job requires. One call to add a page equals one printed page.
PrintJob.start(
paperHeight
PrintJob.addPage()
function call and the
PrintJob.start()
to be printed and spooling to stop.
PrintJob()
PrintJob.start()
Unit
points
points
points
points
n/a
.
frameNum
) method returns a value of
,
,
paperWidth
pageHeight
and
PrintJob.send()
PrintJob.send()
, causing any pages that are added by
PrintJob.send()
properties are initialized to 0. When
function populates the following properties:
Notes
Overall paper height
Overall paper width
Height of actual print-
able area on the page;
does not include any
user-set margins
Width of actual printable
area on the page; does
not include any user-set
margins
Portrait or landscape
orientation
method. Although the method can
PrintJob.addPage()
target/level
. (The value
true
). If successful, the
delete
,
, and
pageWidth
expeditiously. If ten
function call, which sends
PrintJob.start()
. The three optional parameters
in place of the
NULL
FLASH CS3
459
User Guide
orien-
is

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents