ActionScript 3 Print all Items on Stage
Simple class for printing all items on the stage. Along with another class for printing from a contextual menu. Something to note, is that the Flash player wont allow you to add your own “Print” menu item, it seems that is a reserved keyword. Which makes sense.
This class is probably a dirty hack.
This has only been tested when being instantiated from either a document class, maintimeline or via a custom menu class.
Basically what this does is create a temp empty sprite, loop through all instances on the stageand add them to this temp sprite, then print this temp sprite as the print job class accepts only a single sprite as an argument. (unless I’m missing something?). When the print job has been sent the objects are removed from the temp sprite and added back to the stage. The temp sprite is then deleted. There is a degree of error handling in the print functions for trapping cancelled jobs etc. No support for page sizes, or other elements of the printjob class are provided. They can be added, but this was a quick dirty hack to see if printing the stage was relatively simple.
View Example
Here is an example;?Ǭ†http://www.noponies.com/dev/printstage/?Ǭ†
Source Files
Here are the source files; ?Ǭ†Print Stage Source Files?Ǭ†?Ǭ†Archive contains .fla, document class, print class and context menu class.

April 11th, 2008 at 5:18 am
I want to print more pages if the mc is more than one page, but with youre code he will print only the first page. Can you help me?
Thanks