![MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual Download Page 596](http://html1.mh-extra.com/html/macromedia/flash-mx-2004-actionscript/flash-mx-2004-actionscript_reference-manual_3378897596.webp)
596
Chapter 12: ActionScript Dictionary
Description
Constructor; creates a PrintJob object that you can use to print one or more pages.
To implement a print job, use these methods in the sequence shown:
// create PrintJob object
my_pj = new PrintJob();
// instantiate object
// display print dialog box
my_pj.start();
// initiate print job
// add specified area to print job
// repeat once for each page to be printed
my_pj.addPage([params]);
// send page(s) to spooler
my_pj.addPage([params]);
my_pj.addPage([params]);
my_pj.addPage([params]);
// send pages from the spooler to the printer
my_pj.send(); //
page(s)
// clean up
delete my_pj;
// delete object
In your own implementation of PrintJob objects, you should check for return values from
PrintJob.start()
and
PrintJob.addPage()
before continuing to print. See the examples for
PrintJob.addPage()
.
You cannot create a PrintJob object until any PrintJob object that you already created is no longer
active (that is, it either completed successfully or failed). If you try to create a second PrintJob
object (by calling
new PrintJob()
) while the first PrintJob object is still active, the second
PrintJob object will not be created.
Example
See
PrintJob.addPage()
.
See also
PrintJob.addPage()
,
PrintJob.send()
,
PrintJob.start()
PrintJob.addPage()
Availability
Flash Player 7.
Usage
my_pj
.addPage(
target
[,
printArea
] [,
options
] [,
frameNumber
])
Parameters
target
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
}
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...