Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript AS2打印外部图像_Actionscript - Fatal编程技术网

Actionscript AS2打印外部图像

Actionscript AS2打印外部图像,actionscript,Actionscript,我有这个脚本,我可以打印我在代码中指出的电影 function print_page() { var my_pj = new PrintJob(); var myResult = my_pj.start(); if (myResult) { myResult = my_pj.addPage("img_mc", null, {printAsBitmap:true}, 1); my_pj.send(); delete m

我有这个脚本,我可以打印我在代码中指出的电影

function print_page()
{
    var my_pj = new PrintJob();
    var myResult = my_pj.start();
    if (myResult)
    {
        myResult = my_pj.addPage("img_mc", null, {printAsBitmap:true}, 1);
        my_pj.send();
        delete my_pj;
        trace("ok");
    }
}
我需要知道,如何打印一些图片,是外面的flahs。。。在MC中单击。。。。但我需要在AS2


我需要帮助

这是使用PrintJob和AS2成功打印外部图像的唯一方法

#include "mc_tween2.as"

_root.myholder.loadMovie("teste_labirinto.jpg");
_root.myholder._x = 0; //i set the x and y position of image out of the screen area!
_root.myholder._y = 990; //

function print_page()
{
    var my_pj = new PrintJob();
    var myResult = my_pj.start();
    if (myResult)
    {
        my_pj.orientation = portrait;
        myResult = my_pj.addPage("myholder", {xMin:0, xMax:600, yMin:0, yMax:800}, {printAsBitmap:true}, 1);
        my_pj.my_pj.send();
        delete my_pj;
        trace("ok");
    }
}

btn.onRelease = function()
{
    print_page();
};