AS3 Print Help
Budget $30-250 USD
- Freelancer
- Jobs
- Adobe Flash
- AS3 Print Help
I have AS3 code that works nicely to print SWFs, but trying to do the same thing in Flex (print the swfLoader) has not proven to work. I get a blank page. When I try using the FlexPrintJob class instead, the text outlines from my swfs do not print correctly, and I cannot change the orientation of the page.
I'll pay up to $50 for somebody to get this working in Flex, and perhaps help me set resolution of the output!
Here is the code:
import mx.printing.*;
import [url removed, login to view];
import [url removed, login to view];
import [url removed, login to view];
import [url removed, login to view];
import [url removed, login to view];
// Create a PrintJob instance.
private function doPrint():void {
// Create an instance of the FlexPrintJob class.
var printJob:PrintJob = new PrintJob();
var options:PrintJobOptions = new PrintJobOptions();
[url removed, login to view] = true;
removeMask();
// Start the print job.
if ([url removed, login to view]() != true) return;
var sp:Sprite = new Sprite();
var a:BitmapData = new BitmapData([url removed, login to view], [url removed, login to view]);
var b:Bitmap = new Bitmap(a,"auto",false);
//[url removed, login to view](stage);
[url removed, login to view]([url removed, login to view]);
addChild(sp);
[url removed, login to view](b)
// Add the object to print. Do not scale it.
// [url removed, login to view](sp, [url removed, login to view]);
[url removed, login to view](sp, null,options);
if(((printJob.orientation=="portrait")&&([url removed, login to view]>[url removed, login to view]))||
((printJob.orientation=="landscape")&&([url removed, login to view]<[url removed, login to view])))
{
[url removed, login to view] = -90;
}
var printScale=[url removed, login to view](([url removed, login to view]),([url removed, login to view]));
[url removed, login to view] = [url removed, login to view] = printScale;
[url removed, login to view](sp, null,options);
// Send the job to the printer.
[url removed, login to view]();
removeChild(sp);
replaceMask();
}
private function removeMask():void {
[url removed, login to view] = null;
[url removed, login to view] = false;
}
private function replaceMask():void {
[url removed, login to view] = [url removed, login to view];
[url removed, login to view] = true;
}
3 freelancers are bidding on average $52 for this job
We have a powerful team of professional designers, and can provide you delivery before payment service.(No advance payment is needed. We offer samples of products first. Should you be satisfied and make your decision o More