import flash.printing.PrintJob;
/**
* This function will print a sprite.
*
* @param image the sprite to be printed or send to printer
*/
function printImage( image:Sprite ) : void {
var pj:PrintJob = new PrintJob();
var pagesToPrint:uint = 0;
if( pj.start() ) {
image.height = pj.pageHeight;
image.width = pj.pageWidth;
try {
pj.addPage(image);
pagesToPrint++;
}
catch(e:Error) {
// do nothing
}
if(pagesToPrint > 0) {
pj.send();
}
}
}
function printImage( image:Sprite ) : void {
var pj:PrintJob = new PrintJob();
var pagesToPrint:uint = 0;
if( pj.start() ) {
image.height = pj.pageHeight;
image.width = pj.pageWidth;
try {
pj.addPage(image);
pagesToPrint++;
}
catch(e:Error) {
// do nothing
}
if(pagesToPrint > 0) {
pj.send();
}
}
}
Related Links:
it can't be that easy...
ReplyDeletewell, you have to add a button that will perform the function. Anyone tried?
ReplyDelete
ReplyDeleteglobal
{
color: #FFFFFF;
}
.dataTip
{
color: #000000;
}
ReplyDeleteglobal
{
color: #FFFFFF;
}
.dataTip
{
color: #000000;
}
ReplyDelete
Deleteglobal
{
color: #FFFFFF;
}
.dataTip
{
color: #000000;
}