Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 492

Programming actionscript 3.0
Table of Contents

Advertisement

Setting vector or bitmap rendering
You can manually set the print job to spool each page as vector graphics or a bitmap image. In
some cases, vector printing will produce a smaller spool file, and a better image than bitmap
printing. However, if your content includes a bitmap image, and you want to preserve any
alpha transparency or color effects, you should print the page as a bitmap image. Also, a non-
PostScript printer automatically converts any vector graphics to bitmap images. You specify
bitmap printing in the third parameter of
PrintJobOptions object with the
var options:PrintJobOptions = new PrintJobOptions();
options.printAsBitmap = true;
myPrintJob.addPage(mySprite, null, options);
If you don't specify a value for the third parameter, the print job will use the default, which is
vector printing.
If you don't want to specify a value for
specify a value for bitmap printing, use
Timing print job statements
ActionScript 3.0 does not restrict a PrintJob object to a single frame (as did previous versions
of ActionScript). However, because the operating system displays print status information to
the user once the user has clicked the OK button in the Print dialog box, you should call
PrintJob.addPage()
A delay reaching the frame containing the
process.
Because ActionScript 2.0 does have a single-frame restriction, any print job statements in
ActionScript 2.0 are restricted to 15 seconds before hitting the script time-out limit. In
ActionScript 3.0, this script time-out limit still applies. Therefore, the time between each
major statement in a print job sequence cannot exceed 15 seconds. In other words, the 15-
second script time-out limit applies to the following intervals:
Between
PrintJob.start()
Between
PrintJob.addPage()
Between the last
PrintJob.addPage()
If any of these intervals spans more than 15 seconds, the next call to
the PrintJob instance returns
instance causes Flash Player to throw a run-time exception.
492
Printing
PrintJob.addPage()
printAsBitmap
printArea
and
PrintJob.send()
PrintJob.send()
and the first
and the next
and
, and the next
false
, by passing a
parameter set to
(the second parameter) but want to
for
.
null
printArea
as soon as possible to send pages to the spooler.
call will delay the printing
PrintJob.addPage()
PrintJob.addPage()
PrintJob.send()
PrintJob.addPage()
, as follows:
true
PrintJob.start()
on the PrintJob
on

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents