MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 391

Actionscript language reference
Table of Contents

Advertisement

// display print dialog box, but only initiate the print job
// if start returns successfully.
if (my_pj.start()) {
// use a variable to track successful calls to addPage
var pagesToPrint:Number = 0;
// add specified area to print job
// repeat once for each page to be printed
if (my_pj.addPage([params])) {
pagesToPrint++;
}
if (my_pj.addPage([params])) {
pagesToPrint++;
}
if (my_pj.addPage([params])) {
pagesToPrint++;
}
// send pages from the spooler to the printer, but only if one or more
// calls to addPage() was successful. You should always check for successful
// calls to start() and addPage() before calling send().
if (pagesToPrint > 0) {
my_pj.send();
}
}
// clean up
delete my_pj;
You cannot create a second PrintJob object while the first one is still active. You cannot create a
second PrintJob object (by calling
the second PrintJob object will not be created.
Example
See
PrintJob.addPage()
See also
PrintJob.addPage(), PrintJob.send(),
PrintJob.addPage()
Availability
Flash Player 7.
Usage
my_pj.addPage(target:Object [, printArea:Object] [, options:Object ] [,
frameNumber:Number]) : Boolean
// print page(s)
// delete object
new PrintJob()
.
) while the first PrintJob object is still active,
PrintJob.start()
PrintJob.addPage()
391

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents