3 Replies Latest reply on Oct 2, 2007 7:26 PM by Craig Grummitt

    Problem with printJob.

    Robert Hayes
      I have been following the Help File examples for the printJob class with no success.

      I added some graphics to the stage and linked the following code to the print button.

      it seems to work OK but all I get is a blank page.

      package
      {
      import flash.printing.PrintJob;
      import flash.display.Sprite;
      import flash.events.MouseEvent;


      public class PrintTest extends Sprite
      {
      var myPrintJob:PrintJob = new PrintJob();
      var mySprite:Sprite = new Sprite();

      public function PrintTest()
      {
      this.buttonMode = true;
      this.addEventListener(MouseEvent.CLICK, BasicPrintExample);
      }

      public function BasicPrintExample(event:MouseEvent)
      {
      if (myPrintJob.start())
      {
      myPrintJob.addPage(mySprite);
      myPrintJob.send();
      }
      }
      }
      }

      Thanks for your help.

      Robert Hayes