?
Solved

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

Posted on 2010-09-12
2
Medium Priority
?
627 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 1000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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 live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

764 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