Solved

tab to next component textfield

Posted on 2006-10-19
1
159 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
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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 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.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

803 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