Question : Flash Actionscript Print Function

I am trying to insert the following print function into a button and its erroring out when I try to preview the flash (not to mention not print).  Can somone point me in the right direction:
btn.onRelease = function()
{
        var pj = new PrintJob();
        var success = pj.start();
        if(success)
        {
                pj.addPage (0, {xMin : 0, xMax: 400: yMin: 0, yMax: 400});
                pj.addPage("mc", {xMin : -300, xMax: 300, yMin: 400, yMax: 800});
                pj.send();
        }
        delete pj;
}

When I run the flash I get this error:
**Error** Scene=Scene 1, layer=Layer 14, frame=1:Line 7: '}' or ',' expected
                     pj.addPage (0, {xMin : 0, xMax: 400: yMin: 0, yMax: 400});

**Error** Scene=Scene 1, layer=Layer 14, frame=1:Line 10: Unexpected '}' encountered
             }

**Error** Scene=Scene 1, layer=Layer 14, frame=1:Line 1: '}' or ',' expected
     btn.onRelease = function(){        var pj = new PrintJob();        var success = pj.start();        if(success)        {                pj.addPage (0, {xMin : 0, xMax: 400: yMin: 0, yMax: 400});                pj.addPage("mc", {xMin : -300, xMax: 300, yMin: 400, yMax: 800});                pj.send();        }        delete pj;}

Total ActionScript Errors: 3        Reported Errors: 3

Answer : Flash Actionscript Print Function

Try this.  I know it looks the same, but this parses ok!

btn.onRelease = function()
{
      var pj = new PrintJob();
      var success = pj.start();
      if (success)
      {
            pj.addPage(0, {xMin:0, xMax:400, yMin:0, yMax:500});
            pj.addPage("mc", {xMin:-300, xMax:300, yMin:400, yMax:800});
            pj.send();
      }
      delete pj;
};
Random Solutions  
 
programming4us programming4us