VIDEO: How to Print from Flash Using ActionScript

Sun, Dec 20, 2009

ActionScript

VIDEO: How to Print from Flash Using ActionScript

This movie requires Flash Player 9

Print from Flash using ActionScript. A few requirements. You will need to tell what printer to use, with the start method. The start method will pop the printer selection dialog box
Another requirement for a print job to be sent is to have at least one page. No pages, no printing.

Download complete tutorial, without advertisement, on FLV format with tested source FLA files: $5

For the Adobe Reference on printing, click here

HERE IS THE SOURCE CODE!

//The ActionScript 3.0 Print from Flash Using ActionScript 3.0
// Avraham Saltoun
// solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE

print_btn.addEventListener(MouseEvent.CLICK, printMe);

function printMe (event:MouseEvent) {
var myPrintJob:PrintJob = new PrintJob();
// this creates a print job

myPrintJob.start();
//This will pop the dialog box
//with printer options
// this is required in order to send

myPrintJob.addPage(circle_mc);
// this will add a page
// the page will contain only the circel

myPrintJob.addPage(this);
// this will add an additional page
// that will show the whole stage
// this means the circle on top of
// the square

myPrintJob.send();
// This will only work if
// print start and at least one page
// was added!!

// thanks for watching !!!

}

Related Articles:

, , , , , , , , , , , , , , , ,

32 Responses to “VIDEO: How to Print from Flash Using ActionScript”


Trackbacks/Pingbacks

Leave a Reply

You must be logged in to post a comment.

My name is Avraham Saltoun, and I live in Jerusalem, Middle East. I am currently on my mid  40's and I am a computer programming technician. Here you will find over one hundred quality video tutorials on Actionscript, and yes, I give online support for aspiring programmers, and pros as well, sharing screen on skype and delivering source code by email, click the button for live flash actionscript support now!

 
oDesk Certified Action Script Programmer
oDesk Certified Adobe Flash CS3 Designer
oDesk Certified Adobe Photoshop 6.0 Designer
Skype Me™!

$7.49 .Com! Score Savings Cartoon Smart Tutorials


1,260
Unique Visitors
Previous 30 Days
Powered By Google Analytics