A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Print Bitmap

  1. #1
    Junior Member
    Join Date
    Nov 2014
    Posts
    12

    Unhappy Print Bitmap

    Would you like to learn how to print files from a key frame, Bitmap found a script he most print automatically, wanted from printing only when clicked the button.

  2. #2
    Junior Member
    Join Date
    Nov 2014
    Posts
    12
    the script is this

    print_bt.addEventListener(MouseEvent.CLICK, printThis);
    function printThis(e:MouseEvent):void
    {
    var myPrintJob:PrintJob = new PrintJob();
    myPrintJob.start();
    myPrintJob.addPage(card);
    myPrintJob.send();
    }

    var bd :BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight, false);
    bd.draw(stage);
    var b:Bitmap = new Bitmap (bd);
    var card:Sprite = new Sprite();
    card.addChild(b);


    var myPrintJob:PrintJob = new PrintJob();
    myPrintJob.start();
    myPrintJob.addPage(card);
    myPrintJob.send();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center