• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Number multiple pages when printing AS2

New Here ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

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>

TOPICS
ActionScript

Views

498

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 21, 2017 Jan 21, 2017

Copy link to clipboard

Copied

LATEST

that's not a quick and easy thing to code.  it would take me about an hour to do encode that and that's more than i do without being hired.

if you're patient and/or can google an answer, you might get that help for free.  otherwise, you can hire me by sending a private message here or an email via http://www.kglad.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines