topical media & game development
professional-flex-code-08-SimpleMultiPagePrintJob.mx
professional-flex-code-08-SimpleMultiPagePrintJob.mx
[swf]
flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.printing.FlexPrintJob;
private function print():void {
// create print job
var printJob:FlexPrintJob = new FlexPrintJob();
if(printJob.start()){
// add 2 pages
printJob.addObject(page1,"none");
printJob.addObject(page2,"none");
// send to printer
printJob.send();
}
}
]]>
</mx:Script>
<mx:Label id="page1" text="Hello World page 1" />
<mx:Label id="page2" text="Hello World page 2" />
<mx:Button click="print()" label="Print" />
</mx:Application>
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.