Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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 how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

746 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

12 Experts available now in Live!

Get 1:1 Help Now