Solved

tab to next component textfield

Posted on 2006-10-19
1
163 Views
Last Modified: 2010-04-03
I have 4 component textboxes and when the user enters in 4 characters in each textfield, I want to tab to the next textfield.  How would you do that?   Also, how can I convert what the user is typing into all caps (numbers would also be included)?
0
Comment
Question by:COwebmaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
ID: 17772158
Hi, a nice tidy way to do it would be in an array, for this example i'm using a button to call the function, i'm assuming you're not want to be lstening the whole time for textfield changes.

var textboxesArray:Array = new Array("textbox1", "textbox2", "textbox3", "textbox4"); //parse the instance names of your textboxes.
function doIt() {
      trace(textboxesArray.length+"test");
      for (var i = 0; i<textboxesArray.length; i++) {
            eval(textboxesArray[i]).tabEnabled = true;
            eval(textboxesArray[i]).tabIndex = i+1;
            var textBoxValue:String = eval(textboxesArray[i]).text;
            trace(textBoxValue.toUpperCase()); //this is the upper case bit.
      }
}
test_btn.onRelease = function() {
      doIt();
};
 

i have tested teh code and it works.
blu.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question