
Starting a print job
539
Starting a print job
Calling the
PrintJob.start()
method prompts Flash Player to spool the print job to the
user’s operating system and also prompts the user’s operating system print dialog box to
appear.
If the user selects an option in the print dialog box to begin printing, the
PrintJob.start(
)
method returns a value of
true
. (The value is
false
if the user cancels the print job, in which
case the script should call only
delete
). If successful, the
PrintJob.start()
method sets
values for the
paperHeight
,
paperWidth
,
pageHeight
,
pageWidth
, and
orientation
properties.
Depending on the user’s operating system, an additional dialog box might appear until
spooling is complete and the function
PrintJob.send
is called: Calls to
PrintJob.addPage()
and
PrintJob.send()
should be made expeditiously. If ten seconds
elapse between the
PrintJob.start()
function call and the
PrintJob.send()
function
call, which sends the print job to the printer, Flash Player effectively calls
PrintJob.send()
,
causing any pages that are added using
PrintJob.addPage()
to be printed and spooling to
stop.
When a new print job is constructed, the
PrintJob()
properties are initialized to 0. When
PrintJob.start()
is 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
PrintJob.start()
function populates the following properties:
Property
Type
Unit
Notes
PrintJob.paperHeight
number
points
Overall paper height.
PrintJob.paperWidth
number
points
Overall paper width
PrintJob.pageHeight
number
points
Height of actual printable area on the
page; does not include any user-set
margins
PrintJob.pageWidth
number
points
Width of actual printable area on the
page; does not include any user-set
margins
PrintJob.orientation
string
n/a
Portrait or landscape orientation
NO
T
E
A point is a print unit of measurement that is equal in size to one pixel, a screen unit of
measure. For more information about unit equivalencies, see
“About scaling”
on page 541
.
Содержание FLASH 8-USING FLASH
Страница 1: ...Using Flash...
Страница 12: ...12 Contents...
Страница 110: ...110 Using Symbols Instances and Library Assets...
Страница 128: ...128 Working with Color Strokes and Fills...
Страница 156: ...156 Drawing...
Страница 190: ...190 Working with Text...
Страница 224: ...224 Working with Graphic Objects...
Страница 270: ...270 Creating Motion...
Страница 310: ...310 Working with Video...
Страница 362: ...362 Working with Screens Flash Professional Only...
Страница 386: ...386 Creating Multilanguage Text...
Страница 454: ...454 Data Integration Flash Professional Only...
Страница 500: ...500 Publishing...
Страница 534: ...534 Creating Accessible Content...