EasyManua.ls Logo

MACROMEDIA FLASH 8-USING FLASH - Page 540

MACROMEDIA FLASH 8-USING FLASH
678 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
540 Printing from SWF Files
Adding pages to a print job
You add pages to your print job with the PrintJob.addPage() method. Although the
method can include as many as four parameters, the only required parameter is
target/
level
. The three optional parameters are printArea, options, and frameNum.
If you are not using a particular optional parameter but are using other optional parameters,
use
NULL in place of the excluded optional parameter.
With all four parameters, the function uses the following syntax:
MyPrintJob.addPage(target[,printArea:Object, options:Object,
frameNum:Number]):boolean;
If you provide an invalid parameter, the print job uses default parameter values, which are
specified in the following sections.
Each call to add a new page is unique, which lets you modify parameters without affecting
previously set parameters. For example, you can specify that one page print as a bitmap image
and another page print as a vector graphic. You can add as many new pages to your print job
as the print job requires. One call to add a page equals one printed page.
Specifying a target
The target parameter can be either a number that represents a level (such as 0 for the _root
document), or a string that represents the instance name of a movie clip (
"myMovieClip").
Specifying a print area
The printArea optional parameter includes the following values:
{xMin:Number, xMax:Number, yMin:Number, yMax:Number}
NOTE
Any ActionScript that needs to be called to change a resulting printout must run before
the PrintJob.addPage() method is called. The ActionScript can, however, run before
or after a new PrintJob(). If a frame has a call to the PrintJob.addPage() method, the
call itself does not guarantee that the ActionScript script on that frame will run when that
frame is printed.

Table of Contents

Related product manuals