704
Chapter 2: ActionScript Language Reference
PrintJob.start()
Availability
Flash Player 7.
Usage
my_pj
.start()
: Boolean
Parameters
None.
Returns
A Boolean value:
true
if the user clicks OK when the print dialog boxes appear;
false
if the user
clicks Cancel or if an error occurs.
Description
Method; displays the operating system’s print dialog boxes and starts spooling. The print dialog
boxes let the user change print settings. When the
PrintJob.start()
method returns
successfully, the following read-only properties are populated, representing the user’s print
settings:
For more information, see “Specifying a print area (when not using the PrintJob object)” in
Using
Flash
.
After the user clicks OK in the Print dialog box, the player begins spooling a print job to the
operating system. You should issue any ActionScript commands that affect the printout, and you
can use
PrintJob.addPage()
commands to send pages to the spooler. You can use the read-only
height, width, and orientation properties this method populates to format the printout.
Because the user sees information such as “Printing page 1” immediately after clicking OK, you
should call the
PrintJob.addPage()
and
PrintJob.send()
commands as soon as possible.
If this method returns
false
(for example, if the user clicks Cancel instead of OK in the
operating system’s Print dialog box), any subsequent calls to
PrintJob.addPage()
and
PrintJob.send()
will fail. However, if you test for this return value and don’t send
PrintJob.addPage()
commands as a result, you should still delete the PrintJob object to make
sure the print spooler is cleared, as shown in the following example:
var my_pj:PrintJob = new PrintJob();
Property
Type
Units Notes
PrintJob.paperHeight
Number
Points
Overall paper height.
PrintJob.paperWidth
Number
Points
Overall paper width.
PrintJob.pageHeight
Number
Points
Height of actual printable area on the
page; any user-set margins are ignored.
PrintJob.pageWidth
Number
Points
Width of actual printable area on the
page; any user-set margins are ignored.
PrintJob.orientation
String
N/A
“Portrait” or “landscape.”
Summary of Contents for FLASH MX
Page 1: ...ActionScript Language Reference ...
Page 20: ...20 Contents ...
Page 24: ...24 Chapter 1 Introduction ...
Page 145: ...Button onKeyDown 145 See also Button onKeyUp ...
Page 202: ...202 Chapter 2 ActionScript Language Reference See also break default strict equality switch ...
Page 282: ...282 Chapter 2 ActionScript Language Reference See also break continue while ...
Page 383: ...LoadVars addRequestHeader 383 See also XML addRequestHeader ...
Page 388: ...388 Chapter 2 my_lv load place a valid URL pointing to a text file here ...
Page 463: ...Microphone setRate 463 See also Microphone rate ...
Page 469: ...Microphone silenceLevel 469 See also Microphone gain Microphone setSilenceLevel ...
Page 480: ...480 Chapter 2 ActionScript Language Reference See also Mouse addListener ...
Page 529: ...MovieClip globalToLocal 529 See also MovieClip getBounds MovieClip localToGlobal ...
Page 612: ...612 Chapter 2 ActionScript Language Reference See also MovieClipLoader onLoadStart ...
Page 623: ...NetConnection class 623 See also NetStream class Video attachVideo ...
Page 649: ...Number 649 See also NaN Number class ...
Page 679: ...on 679 on release trace X this _x trace Y this _y stopDrag See also onClipEvent ...
Page 683: ...onUpdate 683 buttonLabel textColor my_mc labelColor ...
Page 788: ...788 Chapter 2 ActionScript Language Reference See also private public ...
Page 1001: ...Video height 1001 my_mc _height my_mc my_video height See also MovieClip _height Video width ...
Page 1022: ...1022 Chapter 2 ActionScript Language Reference See also XML createElement ...
Page 1057: ...XML xmlDecl 1057 See also XML docTypeDecl XML toString ...
Page 1070: ...1070 Chapter 2 ActionScript Language Reference ...
Page 1104: ...1104 Appendix Deprecated Language Elements ...