Solved

Print the whole stage in AS3

Posted on 2007-11-16
3
1,529 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
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Action Script coding 1 183
free photo watermark software 5 93
Is it possible to insert an Adobe Flash video in a .net  web page ? 2 105
Adobe Flash player - Microsoft Edge 9 176
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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 the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
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.

831 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