Solved

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

Posted on 2010-09-12
2
580 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
need a player that can play .d and .i DVR files 9 1,487
How to convert pdf file to html file 8 388
Google Chrome Blank White Screens 13 294
Adobe Presenter not Publishing Slide Theme 17 120
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 …
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

867 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now