Printing bug in AS2 project

Hi,

I’m not overly familiar with AS2 as I’ve only ever learned AS3, but at work I’ve been given a task to fix the printing functionality of one of our older AS2 projects.

The code, as far as I can see, is fine;


on (press)
{
    trace("Click!");
    
    var myPrintJob:PrintJob = new PrintJob();
    
    if (myPrintJob.start()) 
    { 
        try 
        { 
            myPrintJob.addPage("_parent.printable", null, null, 1); 
        } 
        catch (e:Error) 
        {
            trace(e);
        } 
        myPrintJob.send(); 
    } 
    delete myPrintJob;
}

Now, this code is contained within a file called page1.swf. page1.swf is loaded by entry.swf.

What I’ve noticed is the print functionality works just fine when when I run page1.swf locally. However, when loaded and displayed by entry.swf it only ever prints a blank page. I’ve placed trace() statements checking the ‘_parent’ and seeing if _parent.printable is null. Both checks show that the _parent is correct and printable exists - so my question is why doesn’t it print when page1.swf is a child of another movie clip?

Any help would be appreciated as I’ve ran out of ideas.

Thanks :slight_smile:

[EDIT]

I should mention, flash is outputting the following warnings after I click my print button;

Warning: Filter will not render. The DisplayObject’s filtered dimensions (3198, 1787) are too large to be drawn.
Warning: Filter will not render. The DisplayObject’s filtered dimensions (3169, 1787) are too large to be drawn.
Warning: Filter will not render. The DisplayObject’s filtered dimensions (3285, 53) are too large to be drawn.
Warning: Filter will not render. The DisplayObject’s filtered dimensions (3285, 53) are too large to be drawn.