简体   繁体   English

Flash CS5:在AS3中进行MovieClip打印

[英]Flash CS5 : MovieClip Printing In AS3

I am facing some problem while printing an swf from another swf movie. 从另一个SWF影片打印SWF时,我遇到一些问题。

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. 我有两部电影,A和B,其中B将被加载到A,并将使用A中的Print btn从A打印。SWF B具有许多层,包括矢量和jpeg文件。 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. 当我将电影B加载到电影A时,它正常播放,但是当我尝试仅打印B顶层中的jpeg图像时,它就可以播放了。 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. 现在的问题是,第二个Flash文件中存在一个动画片段,该动画片段已使用3D旋转工具转换为透视图,并且图像已动态附加到该动画片段。 When I am printing, I am getting everything except the perspective view of the image or even the mc. 当我打印时,除了图像甚至是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);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM