Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3437278
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:02:44+00:00 2026-05-18T08:02:44+00:00

(working in AS2.0 due to player limitations) In my flash application I draw in

  • 0

(working in AS2.0 due to player limitations)

In my flash application I draw in data from an XML. This data is for example 6 lines long in 1 language, but could be 20 in a different language.

However the textbox on the screen can only populate 10 lines of text and I’d like to give the option to users to press the arrows to go to the next page (if there is a next page).

What are my options to get this ‘page’-effect?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:02:44+00:00Added an answer on May 18, 2026 at 8:02 am

    You can figure out the roundabout total of characters that can fit per page. Then use substring to get the text for each page until you reach the end of the xml string. Put each page string into an array and just change the text in the textfield when the user clicks the arrow using an iterator type pattern.

    Edit based on comment:

    Ah I see what you are saying. Well here’s a more brute force, character-by-character method to creating an array of textfields at or around a specified height.

    var pageIndex = 0;
    var maxHeight = 300;
    var copy = "Some super long chunk of text here";
    
    var pages = [];
    
    function parsePages()
    {
        for(var i = 0; i < copy.length; i++)
        {
            if(pages.length == 0) createPage(0);
    
            pages[pageIndex].text += copy.charAt(i);
            pages[pageIndex]._height = pages[pageIndex].textHeight;
    
            if(pages[pageIndex]._height >= maxHeight)
            {
                pageIndex++;
                createPage(pageIndex);
            }
        }
    }
    
    function createPage(index)
    {
        this.createTextField("page_"+index,this.getNextHighestDepth(),0,0,300,12);
        this["page_"+index].multiline = true;
        this["page_"+index].wordWrap = true;
        this["page_"+index].font = "Arial";
        this["page_"+index].size = 10;
        this["page_"+index].text = "";
    
        pages.push(this["page_"+index]);
    }
    
    parsePages();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I'm working on a Flash application that's supposed to send XML data to
I was working with javascript and flash communication with AS2 using ExternalInterface. This works
I'm having a hard time working with arrays. Coming from AS2/AS3 and garbage collection
I have a Flash AS3 application that uses FileReference.browse() to request a SWF from
All, I'm working on an Flash AS2 project that consumes and sends JSON. I'm
i am working on opensource java based application i.e xwiki. Inside hibernate.cfg.xml i can
Working on a legacy application at the moment and we are replacing the data
I am working on a Flash AS2 script that adds an instance of a
All, I'm working on a Flash AS2 project in which I have a choice
A website I'm working on (using AS2 because it's oldschool) has a larger index

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.