Jump to content

Actionscript for printing


lhacker

Recommended Posts

:) Only the flash logo came up???
The ActionScript to print a basic page through Flash Player requires four major statements in sequence: new PrintJob()--Creates a new print job instance of the name you specify. PrintJob.start()--Initiates the printing process for the operating system, invoking the print dialog box for the user, and populates the read-only properties of the print job. PrintJob.addPage()--Contains the details about the print job contents, including the Sprite object (and any children it contains), the size of the print area, and whether the printer should print the image as a vector or bitmap. You can use successive calls to addPage() to print multiple sprites over several pages. PrintJob.send()--Sends the pages to the operating system's printer. So, for example, a very simple print job script may look like the following (including import and class statements for compiling):
import flash.printing.PrintJob;public class BasicPrintExample extends Sprite {	var myPrintJob:PrintJob = new PrintJob();	myPrintJob.start();	myPrintJob.addPage(mySprite);	myPrintJob.send();}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...