Using PrintJob class

Hi all

I’m new to AS3 and was never all that proficient at AS2. I’m working on a simple drag and drop piece and I want to be able to [COLOR=blue][COLOR=blue ! important][FONT=verdana][COLOR=blue ! important][FONT=verdana]print[/FONT][/COLOR][/FONT][/COLOR][/COLOR] the contents of the drag and drop.

I’m trying to use the PrintJob class that comes with CS4 but its not working.

Here’s what I have…

THE BUTTON HANDLER

print_btn.[COLOR=#006600]addEventListener[/COLOR][COLOR=#66CC66]([/COLOR]MouseEvent.[COLOR=#006600]CLICK[/COLOR],printContent[COLOR=#66CC66])[/COLOR]; 

[COLOR=#000000]**function**[/COLOR] printContent[COLOR=#66CC66]([/COLOR]evt:MouseEvent[COLOR=#66CC66])[/COLOR] [COLOR=#66CC66]{[/COLOR]
    [COLOR=#000000]**var**[/COLOR] [COLOR=#0066CC]printJob[/COLOR]:PrintJob = [COLOR=#000000]**new**[/COLOR] [COLOR=#0066CC]PrintJob[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#66CC66])[/COLOR];

    [COLOR=#B1B100]if[/COLOR] [COLOR=#66CC66]([/COLOR][COLOR=#0066CC]printJob[/COLOR].[COLOR=#0066CC]start[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#66CC66])[/COLOR][COLOR=#66CC66])[/COLOR] [COLOR=#66CC66]{[/COLOR]

        [COLOR=#B1B100]if[/COLOR] [COLOR=#66CC66]([/COLOR]content_MC.[COLOR=#006600]width[/COLOR]>printJob.[COLOR=#006600]pageWidth[/COLOR][COLOR=#66CC66])[/COLOR] [COLOR=#66CC66]{[/COLOR]
            content_MC.[COLOR=#0066CC]width[/COLOR]=[COLOR=#0066CC]printJob[/COLOR].[COLOR=#006600]pageWidth[/COLOR];
            content_MC.[COLOR=#006600]scaleY[/COLOR]=content_MC.[COLOR=#006600]scaleX[/COLOR];
        [COLOR=#66CC66]}[/COLOR]

        [COLOR=#0066CC]printJob[/COLOR].[COLOR=#0066CC]addPage[/COLOR][COLOR=#66CC66]([/COLOR]content_MC[COLOR=#66CC66])[/COLOR];
        [COLOR=#0066CC]printJob[/COLOR].[COLOR=#0066CC]send[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#66CC66])[/COLOR];
    [COLOR=#66CC66]}[/COLOR]
[COLOR=#66CC66]}[/COLOR]

THE PrintJob CLASS INCLUDED IN CS4

[LEFT][COLOR=#808080]*//*****************************************************************************[/COLOR]
[COLOR=#808080]*// ActionScript Standard Library*[/COLOR]
[COLOR=#808080]*// PrintJob object*[/COLOR]
[COLOR=#808080]*//*****************************************************************************[/COLOR]

intrinsic [COLOR=#000000]**class**[/COLOR] [COLOR=#0066CC]PrintJob[/COLOR]
[COLOR=#66CC66]{[/COLOR]
    [COLOR=#000000]**var**[/COLOR] orientation:[COLOR=#0066CC]String[/COLOR];
    [COLOR=#000000]**var**[/COLOR] pageHeight:[COLOR=#0066CC]Number[/COLOR];
    [COLOR=#000000]**var**[/COLOR] pageWidth:[COLOR=#0066CC]Number[/COLOR];
    [COLOR=#000000]**var**[/COLOR] paperHeight:[COLOR=#0066CC]Number[/COLOR];
    [COLOR=#000000]**var**[/COLOR] paperWidth:[COLOR=#0066CC]Number[/COLOR];

    [COLOR=#000000]**function**[/COLOR] [COLOR=#0066CC]PrintJob[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#66CC66])[/COLOR];

    [COLOR=#000000]**function**[/COLOR] [COLOR=#0066CC]addPage[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#0066CC]target[/COLOR]:[COLOR=#0066CC]Object[/COLOR], printArea:[COLOR=#0066CC]Object[/COLOR], options:[COLOR=#0066CC]Object[/COLOR], frameNum:[COLOR=#0066CC]Number[/COLOR][COLOR=#66CC66])[/COLOR]:[COLOR=#0066CC]Boolean[/COLOR];
    [COLOR=#000000]**function**[/COLOR] [COLOR=#0066CC]send[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#66CC66])[/COLOR]:[COLOR=#0066CC]Void[/COLOR];
    [COLOR=#000000]**function**[/COLOR] [COLOR=#0066CC]start[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#66CC66])[/COLOR]:[COLOR=#0066CC]Boolean[/COLOR];
[COLOR=#66CC66]}
[/COLOR]
[/LEFT]

I keep getting all sorts of errors prompting me to edit the PrintJob class. But as soon as I make an edit it comes up with one error after another an won’t work.

What am I missing here? Shouldn’t the CS4 PrintJob class just be right out of the box? Sorry if this is such a newbie question. But I am a newbie!

Any help would be greatly appreciated.

Thanks in advance!