PrintJob
1021
If this method returns
false
(for example, if you haven't called
PrintJob.start()
or the
user canceled the print job), any subsequent calls to
PrintJob.addPage()
will fail. However,
if previous calls to
PrintJob.addPage()
were successful, the concluding
PrintJob.send()
command sends the successfully spooled pages to the printer.
If you passed a value for
printArea
, the
xMin
and
yMin
coordinates map to the upper left
corner (0,0 coordinates) of the printable area on the page. The user's printable area is
described by the read-only
pageHeight
and
pageWidth
properties set by
PrintJob.start()
.
Because the 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
printArea
is bigger than
the printable area on the page. If you haven't passed a value for
printArea
and the Stage is
larger than the printable area, the same type of clipping takes place.
If you want to scale a movie clip before you print it, set its
MovieClip._xscale
and
MovieClip._yscale
properties before calling this method, and set them back to their
original values afterward. The scale of a movie clip has no relation to
printArea
. That is, if
you specify 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.
Availability:
ActionScript 1.0; Flash Player 7
Parameters
target
:Object
- A number or string; the level or instance name of the movie clip to print.
Pass a number to specify a level (for example, 0 is the
_root
movie), or a string (in quotation
marks [""]) to specify the instance name of a movie clip.
printArea
:Object
[optional] - An object that specifies the area to print, in the following
format:
{xMin:
topLeft
, xMax:
topRight
, yMin:
bottomLeft
, yMax:
bottomRight
}
The coordinates you specify for
printArea
represent screen pixels relative to the registration
point of the
_root
movie clip (if
target
= 0) or of the level or movie clip specified by
target
. You must provide all four coordinates. The width (
xMax-xMin
) and height (
yMax-
yMin
) must each be greater than 0.
Points are print units of measurement, and pixels are screen units of measurement; points are
a fixed physical size (1/72 inch), but the size of a pixel depends on the resolution of the
particular screen. You can use the following equivalencies to convert inches or centimeters to
twips or points (a twip is 1/20 of a point):
■
1 point = 1/72 inch = 20 twips
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...