A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: text automatically jump from one textfield to another

  1. #1
    Senior Member b18269's Avatar
    Join Date
    Jan 2006
    Location
    London, UK
    Posts
    167

    text automatically jump from one textfield to another

    Hye guys! I have seen this before but lost it on the net somewhere

    I have 3 input text boxes: dayNum,monthNum,yearNum. They each have a charater limit on them, below:

    Code:
    if (dayNum.text.length<2 | monthNum.text.length<2 | yearNum.text.length<4) {
    		trace(" Input Error");
    	} else {
    		trace("Date Selected: "+elapsedYears);
    		if (elapsedYears>=21) {
    			trace("It would be better to be 21");
    		}
    How do I make the character blinker jump from one box to another then you have hit the character limit of the text box? Hopefully that was clear for you to understand. Many thanks

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176

    TextField onChanged handler

    make use of the TextField onChanged handler -
    PHP Code:
    dayNum.onChanged = function(){
    if(
    dayNum.text.length>1Selection.setFocus("monthNum")
    };

    monthNum.onChanged = function(){
    if(
    monthNum.text.length>1Selection.setFocus("yearNum")
    }; 

  3. #3
    Senior Member b18269's Avatar
    Join Date
    Jan 2006
    Location
    London, UK
    Posts
    167
    cheers dog!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center