0

I would like the clients to print what they are seeing at the moment with the flash program.

How is this possible? That is why I said (print screen of program) because its actually printing what the person is seeing at the moment.

The thing is that my program leads to certain places and combinations of photos. So I would like this functionality.

Is this possible?

Norman
  • 79
  • 1
  • 1
  • 7

1 Answers1

0

I assume you want the client to physically print something as opposed to a screen grab..?

What you are probably after is PrintJob(). http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/printing/PrintJob.html

var my_pj:PrintJob = new PrintJob();
if (my_pj.start()) {
  try {
    my_pj.addPage(this.stage);
  }catch(e:Error) {
    //handle error 
  }
  my_pj.send();
}
Trevor Boyle
  • 1,025
  • 7
  • 15
  • I am trying to do the same thing. This code has a problem: the stage dimensions are too big for the printer and gets cropped. The PrintJob documentation suggests setting the object's scaleX and scaleY property before printing, but doing that to the stage will have an undesired visual impact. – elmonty Mar 19 '11 at 21:32
  • @elmonty You could create a bitmap of the stage and then scale and print that or alternatively you could divide the stage in half and print as 2 pages. Something like this my_pj.addPage(this.stage, new Rectangle(0,0,this.stage.stageWidth/2, this.stage.stageHeight)); my_pj.addPage(this.stage, new Rectangle(this.stage.stageWidth/2,0,this.stage.stageWidth/2, this.stage.stageHeight)); – Trevor Boyle Mar 19 '11 at 22:58