Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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 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…

636 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