1028 ActionScript classes
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 in the
operating system's Print dialog box), 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 in the following example:
var my_pj:PrintJob = new PrintJob();
var myResult:Boolean = my_pj.start();
if(myResult) {
// addPage() and send() statements here
}
delete my_pj;
Availability:
ActionScript 1.0; Flash Player 7
Returns
Boolean
- A Boolean value:
true
if the user clicks OK when the print dialog boxes appear;
false
if the user clicks Cancel or if an error occurs.
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...