MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 377

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

Because you are spooling a print job to the user's operating system between your calls to
and
PrintJob.start()
temporarily affect the Flash Player internal view of onscreen Flash content, you should implement
print-specific activities only between your calls to
For example, the Flash content should not interact with the user between
and
PrintJob.send()
add pages to the print job, and send the print job to the printer.
To build a print job:
Create an instance of the print job object:
1.
Start the print job and display the print dialog box for the operating system:
2.
PrintJob.start()
Add pages to the print job (call once per page to add to the print job):
3.
For more information, see
Send the print job to the printer:
4.
print job to the printer" on page
Delete the print job:
5.
on page
381.
The following example shows 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 can run at any given time. A second print job cannot be created until one of
the following events has happened with the previous print job:
The print job was entirely successful and
The PrintJob.start()
The PrintJob.addPage()
The delete PrintJob
, and because the PrintJob functions might
PrintJob.send()
. Instead, you should expeditiously complete formatting of your print job,
. For more information, see
"Adding pages to a print job" on page
PrintJob.send()
381.
. For more information, see
delete PrintJob
PrintJob.send()
method returned a value of
method returned a value of
method has been called.
PrintJob.start()
.
new PrintJob()
"Starting a print job" on page
. For more information, see
method was called.
.
false
.
false
and
PrintJob.send()
PrintJob.start()
378.
PrintJob.addPage()
378.
"Sending the
"Deleting the print job"
Building a print job
.
.
377

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents