Basic printing in AS3:
var my_pj:PrintJob = new PrintJob(); if (my_pj.start()) { try { my_pj.addPage([params]); } catch(e:Error) { // handle error } my_pj.send(); }
Where you replace [params] with the Sprite you want to print.
If you want to print the provided clip to the print page width, you can resize it to the right size before printing:
printClip.width = my_pj.pageWidth; printClip.scaleY = printClip.scaleX;
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/printing/PrintJob.html
Tech Reference: AS3
Leave a Reply