Number multiple pages when printing AS2
Hello
I need to number the pages I print with Actionscript 2 and Flash Player 8.
can you help me please?
I attach the code I use to print any long text on multiple pages.
It works perfectly.
Code:
//MANUAL.TXT - El fichero debe empezar con &_k= A continuación del signo = va el texto a mostrar.
//Ejemplo:
//&_k=Este es el texto que se mostrará.
btn_print.onRelease = function()
{
tt = new LoadVars();
tt.load("manual.txt");
tt.onLoad = function()
{
_root.createTextField("PrintableText",1,0,0,555,802);
PrintableText.multiline = true;
PrintableText.wordWrap = true;
PrintableText.html = true;
PrintableText.htmlText = tt._k;
PrintableText._visible = false;
var allPages:Boolean = false;
pj = new PrintJob();
if (pj.start())
{
while (!allPages)
{
pj.addPage(PrintableText,{xMin:-20, xMax:595, yMin:-20, yMax:842},{printAsBitmap:false});
allPages = PrintableText.scroll >= PrintableText.maxscroll;
if (PrintableText.maxscroll < PrintableText.bottomScroll + 1)
{
while (PrintableText.maxscroll < PrintableText.bottomScroll + 1)
{
PrintableText.htmlText += "<BR/>";
}
}
PrintableText.scroll = PrintableText.bottomScroll + 1;
}
}
pj.send();
delete pj;
PrintableText.removeMovieClip();
};
};
I need to number the pages. Help me please.
Thank you very much!
Jorge Sans Alsina
<personal information removed by Moderator>