Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Print the whole stage in AS3

Posted on 2007-11-16
3
Medium Priority
?
1,554 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 500 total points
ID: 20305367
try this..

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

Z
0
 

Assisted Solution

by:baloney72
baloney72 earned 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

721 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