MACROMEDIA FLASH 8-USING FLASH Use Manual page 538

Using flash
Table of Contents

Advertisement

To build a print job:
1.
Create an instance of the print job object:
2.
Start the print job and display the print dialog box for the operating system:
PrintJob.start()
3.
Add pages to the print job (call once per page to add to the print job):
PrintJob.addPage()
on page
540.
4.
Send the print job to the printer:
the print job to the printer" on page
5.
Delete the print job:
job" on page
543.
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
538
Printing from SWF Files
. For more information, see
. For more information, see
PrintJob.send()
543.
. For more information, see
delete PrintJob
method returned a value of
method returned a value of
method has been called.
.
new PrintJob()
"Starting a print job" on page
"Adding pages to a print job"
. For more information, see
method was called.
PrintJob.send()
.
false
.
false
539.
"Sending
"Deleting the print

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents