Link to home
Start Free TrialLog in
Avatar of fool5683
fool5683Flag for United States of America

asked on

Printing problems with Flash actionscript 3.0 application

I am utilizing the following code to print the contents of my flash application after the user clicks the print button, the printer dialogue screen comes up and you select ok, but nothing prints, it doesn't even show any documents pending. Ive tried printing from other applications and there is no problems. Please advise.
 
function printContent(event: MouseEvent):void
{
var printContent = overallTrainingCost_txt.text + returnedDistance_txt.text + returnedTime_txt.text
var pageSprite: Sprite = new Sprite;
var printJob:PrintJob = new PrintJob();
   if (printJob.start()) 
   
if (printJob.start()) {

     if (printContent.width>printJob.pageWidth) {
         printContent.width = printJob.pageWidth;
		 printContent.wordWrap = true;
		 addChild (pageSprite);
		 pageSprite.addChild(printContent);
		 printContent.addPage(pageSprite);
		 
		 }
   
     printJob.send();
	 removeChild (pageSprite);
   }
}

Open in new window

MapSimple-Testing2.fla
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fool5683

ASKER

It worked perfectly! Thank you very much. You have been a godsend on this project dgofman:)