I am in need of some help. I have looked all over the web for a solution to this. I am new to ActionScript. I want to be able to print all the text inside a scrolling text box. I found several scripts that try to address this but none of them seem to work fully. I was able to piece together something that works in ActionScript 3, but I need it in ActionScript 2. I can trace (my_txt) and it reads it. When the button is pressed it brings up the printer dialog box and seems to be sending something to the printer, but nothing. Any help would be great. Thanks
btn_print.onRelease = function()
{
createTextField(“PrintableText”, 0, 0, 0, 550, 750);
PrintableText._x = -1000; //off the screen
PrintableText.html = true;
PrintableText.multiline = true;
PrintableText.wordWrap = true;
PrintableText.htmlText = _root.my_txt.text;
// my_txt is what I need printed
var maxX = PrintableText._width;
var maxY = PrintableText._height;
var currentScroll:Number = PrintableText.scroll;
//scroll to the top of the page
PrintableText.scroll = 1;
// get the maximum amount of lines
var maxScroll:Number = PrintableText.maxscroll;
// get the lines that can show per page
var bottomLine:Number = PrintableText.bottomScroll;
my_pj = new PrintJob();
var started = my_pj.start();
if(started)
{
var counter:Number = 0;
for(count = 1; count < maxScroll; count ++)
{
my_pj.addPage(PrintableText , {xMin:0, xMax:maxX, yMin:0, yMax:maxY}, null, 2);
count += bottomLine;
//just scroll down the page so the next text you want to print is visible
PrintableText.scroll = count;
}
}
my_pj.send();
delete my_pj;
}