03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The default value is false, which represents a request for vector printing. To print target as<br />

a bitmap, pass true for printAsBitmap. Remember the following suggestions when<br />

determining which value to use:<br />

■ If the content that you're printing includes a bitmap image, use {printAsBitmap:true}<br />

to include any transparency <strong>and</strong> color effects.<br />

■ If the content does not include bitmap images, omit this parameter or use<br />

{printAsBitmap:false} to print the content in higher quality vector format.<br />

If options is omitted or is passed incorrectly, vector printing is used. If you don't want to<br />

specify a value for options but want to specify a value for frameNumber, pass null for<br />

options.<br />

frameNum:Number [optional] - A number that lets you specify which frame to print; passing a<br />

frameNumber does not cause the <strong>ActionScript</strong> on that frame to be invoked. If you omit this<br />

parameter, the current frame in target is printed.<br />

Note: If you previously used print(), printAsBitmap(), printAsBitmapNum(), or<br />

printNum() to print from Flash, you might have used a #p frame label on multiple frames to<br />

specify which pages to print. To use PrintJob.addPage() to print multiple frames, you must<br />

issue a PrintJob.addPage() comm<strong>and</strong> for each frame; #p frame labels are ignored. For one<br />

way to do this programmatically, see the Example section.<br />

Returns<br />

Boolean - A Boolean value: true if the page is successfully sent to the print spooler; false<br />

otherwise.<br />

Example<br />

The following example shows several ways to issue the addPage() comm<strong>and</strong>:<br />

my_btn.onRelease = function()<br />

{<br />

var pageCount:Number = 0;<br />

var my_pj:PrintJob = new PrintJob();<br />

if (my_pj.start())<br />

{<br />

// Print entire current frame of the _root movie in vector format<br />

if (my_pj.addPage(0)){<br />

pageCount++;<br />

// Starting at 0,0, print an area 400 pixels wide <strong>and</strong> 500 pixels high<br />

// of the current frame of the _root movie in vector format<br />

if (my_pj.addPage(0, {xMin:0,xMax:400,yMin:0,yMax:500})){<br />

pageCount++;<br />

PrintJob 1037

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!