![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
To build a print job, you use functions that complete the tasks in the order outlined below. The sections that follow the procedure provide explanations of the functions and properties associated with the PrintJob object.
Because you are spooling a print job to the user's operating system between your calls to PrintJob.start()
and PrintJob.send()
, and because the PrintJob functions might temporarily affect the Flash Player internal view of onscreen Flash content, you should implement print-specific activities only between your calls to PrintJob.start()
and PrintJob.send()
. For example, the Flash content should not interact with the user between PrintJob.start()
and PrintJob.send()
. Instead, you should expeditiously complete formatting of your print job, add pages to the print job, and send the print job to the printer.
new PrintJob()
.PrintJob.start()
. For more information, see Starting a print job.PrintJob.addPage()
. For more information, see Adding pages to a print job.PrintJob.send()
. For more information, see Sending the print job to the printer.delete PrintJob
. For more information, see Deleting the print job.Following is an example of ActionScript that creates a print job for a button:
myButton.onRelease = function() { var my_pj = new PrintJob(); var myResult = my_pj.start(); if(myResult){ myResult = my_pj.addPage (0, {xMin : 0, xMax: 400, yMin: 0, yMax: 400}); myResult = my_pj.addPage ("myMovieClip", {xMin : 0, xMax: 400, yMin: 400, yMax: 800},{printAsBitmap:true}, 1); myResult = my_pj.addPage (1, null,{printAsBitmap:false}, 2); myResult = my_pj.addPage (0); my_pj.send(); } delete my_pj; }
Only one print job may be running at any given time. A second print job can not be created until one of the following has happened with the previous print job:
PrintJob.send()
method was called. The PrintJob.start()
method returned a value of false
. The PrintJob.addPage()
method returned a value of false
. The delete PrintJob
method has been called. ![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |