Problem with PrintJob()

Hi,

Well I am trying very hard on PrintJjob() to get multiple pages printed but just couldnt get through. Can I expect some suggessions from you?

I have one MovieClip in the Lirary in which I am displaying records from XML file. There is a next and back button inside for Pagination, to move to another next page (next set of records). and back page.I want to give PRINTALL button, clicked on which prints all records.

After searching alot and doing R&D I found one hint to make duplicatemovieclips at author time and attach it to a Empty MovieClip
and then fire print action. Following script will give you a hint.

There are 2 functions: one to duplicate MC and another to print.

function duplicateMC(){
count = 0;
while(count<3){
printMC.attachMovie(“att4”, “prints” + count, count);
var refMC = eval(“printMC.prints” + count);
trace("refMC " + refMC)
count++;
}
}

function printPages() {
my_pj = new PrintJob();
if(my_pj.start()){
for (i=0; i<3; i++) {
// identify a page to print
printMC.attachMovie(“att4”, “prints” + i, i);
var myPage = eval(“printMC.prints”+i);
myPage._x=0;
myPage._y=0;
trace("myPage "+myPage);
my_pj.addPage(myPage);
}
}
my_pj.send();
delete my_pj;
}

There are 2 buttons to print all records. On one button (SETUP):
I am calling duplicateMC() and on another button (PRINTALL) calling printPages(). I am getting 3 pages generated but they are blank. Can u tell me what is the problem or any solution to this.

Thanx
Ashish Chandras