Solved

Print the whole stage in AS3

Posted on 2007-11-16
3
1,546 Views
Last Modified: 2010-04-14
I'm wanting to print the entire stage in actionscript 3 (flex.) But the PrintJob.addPage() function only takes a sprite argument, and the stage isn't a sprite. I can think of two solutions:
1.) Add a sprite as the root element of everything else - a big deal because I've got a lot of controls and functionality already.
2.) Create a temporary sprite for printing and all all the stage's children to it. Not sure if this would even work...

Is there a simple way to just print the entire stage? Surely this isn't an unusual scenario?
0
Comment
Question by:jgr4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Accepted Solution

by:
Zeffer earned 125 total points
ID: 20305367
try this..

this.myBtn.onRelease = function() {
 print(this, "bmovie");
};

Z
0
 

Assisted Solution

by:baloney72
baloney72 earned 125 total points
ID: 22959794
Add the stage to a sprite.
And put the whole thing in a try/catch block just in case:
try{
  var pj= new PrintJob()
  pj.start()
  var sp = new Sprite()
  sp.addChild(stage)
  pj.addPage(sp)
  pj.send()
} catch(e){
}

Open in new window

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question