392
Chapter 6: ActionScript Core Classes
Parameters
target
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
An optional 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
•
1 inch = 72 points = 1440 twips
•
1 cm = 567 twips
You can’t reliably convert between pixels and points; the conversion rate depends on the screen
and its resolution. If the screen is set to display 72 pixels per inch, for example, one point is equal
to one pixel.
If you omit the
printArea
parameter, or if it is passed incorrectly, the full Flex screen area of
target
is printed. If you don’t want to specify a value for
printArea
but want to specify a value
for
options
or
frameNumber
, pass
null
for
printArea
.
options
An optional parameter that specifies whether to print as vector or bitmap, in the
following format:
{printAsBitmap:
Boolean
}
The default value is
false
, which represents a request for vector printing. To print
target
as a
bitmap, pass
true
for
printAsBitmap
. Remember the following suggestions when determining
which value to use:
•
If the content that you’re printing includes a bitmap image, use
{printAsBitmap:true}
to
include any transparency and color effects.
•
If the content does not include bitmap images, omit this parameter or use
{printAsBitmap:false}
to print the content in higher quality vector format.
If
options
is omitted or is passed incorrectly, vector printing is used. If you don’t want to specify
a value for
options
but want to specify a value for
frameNumber
, pass
null
for
options
.
frameNumber
An optional number that is used in the Flash authoring environment. When
writing Flex applications, you should omit this parameter or pass a value of 0.
Summary of Contents for FLEX-FLEX ACTIONSCRIPT LANGUAGE
Page 1: ...Flex ActionScript Language Reference...
Page 8: ......
Page 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Page 76: ......
Page 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Page 135: ...case 135 See also break default strict equality switch...
Page 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Page 808: ...808 Chapter 7 ActionScript for Flash...
Page 810: ...810 Appendix A Deprecated Flash 4 operators...
Page 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Page 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Page 822: ...822 Index...