Flash CS5 : MovieClip Printing In AS3
I am facing some problem while printing an swf from another swf movie.
I have two movies, A & B, in which B will be loaded to A and will be printed from A using a Print btn in A. The swf B has many layers including vector and jpeg files. When I load the movie B to movie A it's coming properly, but when I try to print only the jpeg image which is in the top layer of B is coming. I tried printing area of stage, which is also giving the same result. What is the problem?
Here is the code:
print_btn.addEventListener(MouseEvent.CLICK,printContent);
function printContent(evt:MouseEvent) {
var printJob:PrintJob = new PrintJob();
if (printJob.start()) {
if (loader_mc.width>printJob.pageWidth) {
loader_mc.width=printJob.pageWidth;
loader_mc.scaleY=loader_mc.scaleX;
}
printJob.addPage(loader_mc);
printJob.send();
}
}
I've got the problem solved to some extent. Now the problem is that there is a movieclip in the second flash file which is converted to a perspective view using the 3D rotation tool and an image is attached dynamically to it. When I am print开发者_JAVA技巧ing, I am getting everything except the perspective view of the image or even the mc.
Try to render a new movieclip and then print that one:
var jpgSource:BitmapData = new BitmapData (width size, height size);
jpgSource.draw(your source movieclip);
精彩评论