![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 7.
my_pj
.start()
None.
A Boolean value of true
if the user clicks OK when the print dialog boxes appear, or false
if the user clicks Cancel or if an error occurs.
Method; displays the operating system's print dialog boxes and starts spooling. The print dialog boxes give the user an opportunity to change print settings, and then populate the following read-only properties (notice that 1 point equals 1 onscreen pixel):
Property |
Type |
Units |
Notes |
---|---|---|---|
|
Number |
Points |
Overall paper height |
|
Number |
Points |
Overall paper width |
|
Number |
Points |
Height of actual printable area on the page; any user-set margins are ignored |
|
Number |
Points |
Width of actual printable area on the page; any user-set margins are ignored |
|
String |
n/a |
"Portrait" or "landscape" |
After the user clicks OK in the print dialog box, the player begins spooling a print job to the operating system. You should issue any ActionScript commands that affect the printout, and then you can begin using PrintJob.addPage()
commands to begin sending pages to the spooler. If you wish, use the height, width, and orientation properties this method returns to determine how to format the printout.
Because the user sees information such as "Printing page 1" immediately after clicking OK, you should call the PrintJob.addPage()
and PrintJob.send()
commands as soon as possible.
If this method returns false
(for example, if the user clicks Cancel instead of OK), any subsequent calls to PrintJob.addPage()
and PrintJob.send()
will fail. However, if you test for this return value and don't send PrintJob.addPage()
commands as a result, you should still delete the PrintJob object to make sure the print spooler is cleared, as shown below.
var my_pj = new PrintJob(); var myResult = my_pj.start(); if(myResult) { // addPage() and send() statements here } delete my_pj;
See PrintJob.addPage()
.
PrintJob.addPage()
, PrintJob.send()
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |