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 9255057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:37:36+00:00 2026-06-18T11:37:36+00:00

I have an array that makes multiple textfields based off a user variable. The

  • 0

I have an array that makes multiple textfields based off a user variable. The code below is connected to a function that fires when text is added. From there it’s supposed to find the widest text field, and then apply the width to rest of the textfields so they all are the same size.

Here is the code that is giving me problems. I could use a second look to see perhaps if my syntax is improper or if there’s a better way at going at this.

for (var ied: int=1; ied>=electoff.electinput.textArray.length; ied++)
{
    trace("one");
    widest=(electoff.electinput.textArray["b"+ied].width>widest)?electoff.electinput.textArray["b"+ied].width:widest;

}
for (i =ied; i<electoff.electinput.textArray.length; ied++)
{
    electoff.electinput.textArray["b"+ied].width = widest;
    trace("two");
}

Here’s the error I’m getting:

TypeError: Error #1010: A term is undefined and has no properties. at
NewPlv2_fla::MainTimeline/ajWidth()[NewPlv2_fla.MainTimeline::frame1:650] at NewPlv2_fla::MainTimeline/_keys()[NewPlv2_fla.MainTimeline::frame1:774]

  • 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-06-18T11:37:37+00:00Added an answer on June 18, 2026 at 11:37 am

    AS3.0 Array is indices are zero-based, which means that the first element in the array is [0], the second element is [1], and so on.

    so FYI you trying to access textArray["b"+ided]. but this syntax is a Associative arrays

    I tested following code. check please.

    import flash.text.TextField;
    var arr:Array = [];
    
    for(var i:int = 0; i<10; i++)
    {
        var tf:TextField = new TextField();
        tf.width = 200 * Math.random();;
        tf.name = "tf" + i;
        tf.height = 100;
        arr.push(tf);
        trace(tf.name + ": " + tf.width);
    }
    
    var widest:Number = 0;
    for (i=0;i<arr.length;i++)
    {
        if(arr[i].width>widest) widest = arr[i].width;
    }
    trace("widest: " + widest);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array that contains an array of arrays if that makes any
I have an Array that contains some elements multiple times. Now I want to
I have an array that contains the points for drawing multiple hills. When I
I have an app that makes multiple connections to different servers at the same
I have multiple arrays shown below. <?php $arrLayout = array( section1 => array( wXBMCLibrary
I have a jQuery function I am calling with the below code. The function
I have an array that contains @sign in the object. I can't access that
I have an array that I populate with parents, children, children of children, children
I have an array that looks something like this: Array ( [0] => apple
I have an array that looks like this: [ Object actions: Array[2] comments: Object

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.