We Recommend

Essential ActionScript 3.0 Essential ActionScript 3.0
The book focuses on the core language and object-oriented programming, but also adds a deep look at the centerpiece of Flash Player's new API: display programming. Enjoy hundreds of brand new pages covering exciting new language features, such as the DOM-based event architecture, E4X, and namespaces--all brimming with real-world sample code.


Posted By

chrisaiv on 02/08/08


Tagged

as3 printing


Versions (?)


Who likes this?

4 people have marked this snippet as a favorite

shoffa
pixeldata
Akuma99
outbox


AS3: Flash Printing Basics


Published in: ActionScript 3 


Random notes on how to execute a Print function


  1. var myPrintJob:PrintJob = new PrintJob();
  2. var result:Boolean = myPrintJob.start();
  3. if (result) {
  4. myPrintJob.addPage("invitation_mc", {xMin:30, xMax:250, yMin:27, yMax:300}, {printAsBitmap:true}, 2);
  5. myPrintJob.addPage("map_mc", null, {printAsBitmap:false}, 1);
  6. myPrintJob.addPage(1, null, {printAsBitmap:true}, null);
  7. myPrintJob.addPage("guestList_mc", null, {printAsBitmap:true}, 4);
  8. for(i = 1; i <= myMovieClip_mc._totalframes; ++1){
  9. myPrintJob.addPage("myMovieClip_mc", null, null, i);
  10. }
  11. myPrintJob.send();
  12. delete myPrintJob;
  13. } else {
  14. //User does not have printer or user canceled print action
  15. }

Report this snippet 

You need to login to post a comment.