# PrintJob ActionScript 2.0 Scrolling Text Box

**URL:** <https://forum.kirupa.com/t/printjob-actionscript-2-0-scrolling-text-box/307218>\
**Category:** Uncategorized\
**Created:** [March 30, 2010, 8:48pm UTC](https://forum.kirupa.com/t/printjob-actionscript-2-0-scrolling-text-box/307218 "2010-03-30T20:48:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CBurk](https://avatars.discourse-cdn.com/v4/letter/c/8491ac/32.png) [@CBurk](https://forum.kirupa.com/u/CBurk)\
**Post date:** [March 30, 2010, 8:48pm UTC](https://forum.kirupa.com/t/printjob-actionscript-2-0-scrolling-text-box/307218/1 "2010-03-30T20:48:16Z")

</div>

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;  
}
