Adobe 38039336 - Flash CS3 Professional User Manual page 464

User guide
Hide thumbs Also See for 38039336 - Flash CS3 Professional:
Table of Contents

Advertisement

Additionally, with properties populated by the
printer settings, such as page height, width, and orientation, and you can configure your document to dynamically
format Flash content that is appropriate for the printer settings.
Build a print job
Because you are spooling a print job to the user's operating system between your calls to the
methods, and because the PrintJob functions might temporarily affect the Flash Player internal
PrintJob.send()
view of onscreen Flash content, implement print-specific activities only between your calls to
and
. For example, the Flash content should not interact with the user between
PrintJob.send()
and
PrintJob.start()
PrintJob.send()
job, and send the print job to the printer.
Create an instance of the print job object:
1
2
Start the print job and display the print dialog box for the operating system:
Add pages to the print job (call once per page to add to the print job):
3
4
Send the print job to the printer:
Delete the print job:
5
delete PrintJob
The following example shows ActionScript code 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
occurs with the previous print job:
• The print job is entirely successful and the
• The
PrintJob.start()
• The
PrintJob.addPage()
• The
delete PrintJob
Note: For information on printing from SWF files at runtime using ActionScript 3.0, see "Printing" in Programming
ActionScript 3.0.
Starting a print job
Calling the ActionScript 2.0
prompts the user's operating system print dialog box to appear.
PrintJob.start()
. Instead, complete formatting of your print job, add pages to the print
new PrintJob()
PrintJob.send()
.
PrintJob.send()
method returns a value of
method returns a value of
method is called.
method spools the print job to the user's operating system and
PrintJob.start()
method, your document can access your user's
.
PrintJob.start()
PrintJob.addPage()
.
method is called.
.
false
.
false
FLASH CS3
User Guide
and
PrintJob.start()
PrintJob.start()
.
.
458

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents