MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 393

Actionscript language reference
Table of Contents

Advertisement

Returns
A Boolean value:
true
Description
Method; sends the specified level or movie clip as a single page to the print spooler. Before using
this method, you must use
times for a print job, you must use
If this method returns
canceled the print job), any subsequent calls to
previous calls to
PrintJob.addPage()
command sends the successfully spooled pages to the printer.
If you passed a value for
(0,0 coordinates) of the printable area on the page. The user's printable area is described by the
read-only
pageHeight
printout aligns with the upper left corner of the printable area on the page, the printout is clipped
to the right and/or bottom if the area defined in
the page. If you haven't passed a value for
printable area, the same type of clipping takes place.
If you want to scale a movie clip before you print it, set its
MovieClip._yscale
values afterward. The scale of a movie clip has no relation to
that you print an area that is 50 x 50 pixels in size, 2500 pixels are printed. If you have scaled the
movie clip, the same 2500 pixels are printed, but the movie clip is printed at the scaled size.
The Flash Player printing feature supports PostScript and non-PostScript printers. Non-
PostScript printers convert vectors to bitmaps.
Example
The following example shows several ways to issue the
Note: Some of the code in the following examples includes a value passed for the frameNumber
parameter, which is supported in the Flash authoring environment. When writing Flex applications,
you should omit or pass a value of 0 for this parameter.
my_btn.onRelease = function()
{
var pageCount:Number = 0;
var my_pj:PrintJob = new PrintJob();
if (my_pj.start())
{
// Print entire current frame of the _root movie in vector format
if (my_pj.addPage(0)){
pageCount++;
// Starting at 0,0, print an area 400 pixels wide and 500 pixels high
// of the current frame of the _root movie in vector format
if (my_pj.addPage(0, {xMin:0,xMax:400,yMin:0,yMax:500})){
if the page is successfully sent to the print spooler;
PrintJob.start()
PrintJob.send()
(for example, if you haven't called
false
were successful, the concluding
, the
printArea
xMin
and
properties set by
pageWidth
printArea
properties before calling this method, and set them back to their original
; after calling
PrintJob.addPage()
to send the spooled pages to the printer.
PrintJob.start()
PrintJob.addPage()
and
coordinates map to the upper left corner
yMin
PrintJob.start()
is bigger than the printable area on
printArea
and the Flex screen is larger than the
MovieClip._xscale
printArea
command:
addPage()
otherwise.
false
one or more
or the user
will fail. However, if
PrintJob.send()
. Because the
and
. That is, if you specify
PrintJob.addPage()
393

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents