Copy link to clipboard
Copied
Hello,
I am using Flash CS3, AS2.
I am trying to print the movieclips placed on different frames in the main timeline.
Firstly, I want to print the movieclip placed on the frame 172, then print a movieclip placed on the frame 179 and so on...
I have applied the code shown below to the on (release) event of a button named btnPrint:
var my_pj:PrintJob = new PrintJob();
if (my_pj.start()) {
var pageAdded:Boolean = false;
pageAdded = my_pj.addPage(0, {xMin:394, xMax:1033, yMin:46, yMax:953}, null, 172);
if (pageAdded) {
my_pj.send();
}
}
I am having 2 problems with the code shown above.
Firstly, when I click the btnPrint button in my flash movie in the web browser, then press the print button on the printer dialog window, it can print the movieclip placed on the frame 172 but the flash movie in my web browser goes to the frame 172 and stops there. I don't want my flash movie to actually go to the frame 172 where the movieclip is placed but I want it to stay at the current frame.
The second problem is, the flash movieclip placed on the frame 172 has actionscript code in it, which sets the text in the textbox inside the movieclip to the variable value which has been retrieved using the loadVariablesNum() method. However the printed out page shows the movieclip with none of the actionscript code executed - the textboxes are blank. I'm sure that the actionscript codes in the movieclip is correct because exactly same movieclip placed on the current frame displays the textbox correctly.
Can somebody explain to me how to sove these problems?
Thank you.
do you see a problem at http://www.kglad.com/Files/forums/test4.html?
Copy link to clipboard
Copied
that code wouldn't cause your timeline to got to frame 172.
there's something else causing that.
Copy link to clipboard
Copied
Thank you for your help.
I have tried the same code again by creating a new blank flash movie and only putting a btnPrint button on frame 1 and a graphic on frame 172.
When I pressed the btnPrint button in the web browser, I could get the correct printed out image, but, once again, the web browser shows the printed image on the browser window and not the current frame at which the btnPrint button is located.
Maybe the web browser is simply showing the printed image rather than the flash movie actually going to the frame 172... I have no idea what's going on.
Copy link to clipboard
Copied
do you see a problem at http://www.kglad.com/Files/forums/test4.html?
Copy link to clipboard
Copied
Thank you very much for your help.
I don't see any problem at test4.html.
I'll try to find out what's causing the error in my flash movie although strangely at the moment I don't have a clue.
Thank you very much for your time.
Copy link to clipboard
Copied
you can download http://www.kglad.com/Files/forums/test4.fla to see where it differs from what you're doing.
Copy link to clipboard
Copied
This morning I have tested the same flash movies on another computer in my company that has Adobe Flash CS6 installed and it worked fine! (After I converted the flash movies to CS6 format and exported)
The computer I have been using and testing so far was a rather old PC and it had Adobe CS3 installed on it and I think the problem could have been caused by the version of Adobe CS3 installed on that PC - probabily not updated.
Thank you very much for your help, kglad
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now