Skip to main content
Known Participant
April 12, 2010
Answered

Print more than one movieclip on one page.

  • April 12, 2010
  • 1 reply
  • 870 views

Hi, I am trying to print a few movieclips on one page.  It looks like the PrintJob function wants to print each movieclip on it's own page.  Does anyone know how to get more that one movieclip to print on the same page?

Thanks for the help.

This topic has been closed for replies.
Correct answer kglad

I think so.  What happens is...

Movieclip A is on the stage.  Movieclip B gets dynamically applied to the stage from the library when the print button is clicked and then Movieclip A is sized and moved on top of Movieclip B.  When I try to print I can only print A or B but not both together.  What I would like to do is determine where Movieclip B is and it's size and then print everything visible on the screen within the height and width of it.

Is there a better way to go about doing this?

Thanks again for the help.


position both A and B in their new parent so both are visible and fit on your page.

here:  www.kglad.com/Files/forums/Untitled-1.fla

1 reply

kglad
Community Expert
Community Expert
April 12, 2010

add all the movieclips to one sprite and add the sprite using the addPage() method.

relief8Author
Known Participant
April 12, 2010

Thanks for the reply.  I tried doing that with the code below and got some strange results.  Some stuff printed ok and some very strange.  Just shapes or nothing at all.  Any thoughts?  One thing I should note is that the frontLoader is on the stage and the OptionBoxReviewDesign is dynamically loaded.

var my_pj:PrintJob = new PrintJob();
                        if (my_pj.start())
                        {
                        try
                            {
                            var clipsToPrint:Sprite = new Sprite();
                            clipsToPrint.addChild(frontLoader);
                            clipsToPrint.addChild(OptionBoxReviewDesign);
                            clipsToPrint.getChildAt(1).x = clipsToPrint.getChildAt(0).width;
                            my_pj.addPage(clipsToPrint);
                            }
                        catch (e:Error)
                            {
                            }
                        my_pj.send();
                    }

kglad
Community Expert
Community Expert
April 13, 2010

has all content completed loading BEFORE you add clipsToPrint to your printjob?

and, it would be easier to check your code if you use:

var my_pj:PrintJob = new PrintJob();
                        if (my_pj.start())
                        {
                        try
                            {
                            var clipsToPrint:Sprite = new Sprite();
                            clipsToPrint.addChild(frontLoader);
                            clipsToPrint.addChild(OptionBoxReviewDesign);

OptionBoxReviewDesign.x=frontLoader.width;
                            my_pj.addPage(clipsToPrint);
                            }
                        catch (e:Error)
                            {
                            }
                        my_pj.send();
                    }