I cannot print the stage:
btn.addEventListener(MouseEvent.CLICK, printFunction);
function printFunction(event:MouseEvent):void
{
var myPrintJob:PrintJob = new PrintJob();
myPrintJob.addPage(0);
myPrintJob.send();
}
it gives me a compile error:
1118: Implicit coercion of a value with static type flash.display:DisplayObject to a possibly unrelated type flash.display:Sprite.
I've also tried:
myPrintJob.addPage(Sprite(0));
there's no compile error; but when I click the print button, there's no print dialog and the output section in Flash gives me this error:
TypeError: Error #1034: Type Coercion failed: cannot convert 0 to flash.display.Sprite. at Untitled_fla::MainTimeline/printFunction()
btn
declared? – Dave