Solved

Input Text Form - Use Tab and Arrow(Cursor) Keys to change focus

Posted on 2010-09-12
2
605 Views
Last Modified: 2012-05-10
I've created a form that the user enters numeric values in to a series of text Input fields. I want to allow the user to use the arrow (cursor) keys in addition to the tab keys to control the active focus of the fields.

I set up a 2D array with the names of the input fields as values. I'm trying to call the name of the input field from the array and then assigning the focus, but I'm getting Error 1067 implicit coercion errors.

stage.focus=nextCellName;
stage.focus=prevCellName;

Any help is appreciated!
tab-arrow-focus-r2.fla
0
Comment
Question by:vizint
[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
2 Comments
 
LVL 3

Accepted Solution

by:
cconstable_work earned 250 total points
ID: 33659252
Hey,
nextCellName and prevCellName are just string values.
In earlier versions of AS you would need to eval() them.

In AS3 it is done like this:

stage.focus=this[nextCellName];
stage.focus=this[prevCellName];

Regards,
0
 

Author Closing Comment

by:vizint
ID: 33662193
Wow... simple solution, I appreciate the help!
0

Featured Post

Technology Partners: 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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
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,…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to record live broadcast.

735 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