Solved

Focus on tab or shift tab

Posted on 2008-10-19
4
1,023 Views
Last Modified: 2013-11-11
Lets say you have two text boxes with the name txtUsername and txtPassword.  Using ActionScript 3 how do you change focus to password when tab is pressed or even shift tab to go up to username.  

I am looking at the FocusManager documentation but i can't get it to work.  Any examples
0
Comment
Question by:stargateatlantis
  • 2
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 500 total points
ID: 22752688
you Just need to add following code:


txtUsername.tabIndex = 0;
txtPassword.tabIndex =1;


IMPORTANT:
To test the tab indexing in Flash authoring environment, you must "Disable Keyboard Shortcuts", see attached image for more details
disableKeyboardShortCuts.jpg
0
 

Author Comment

by:stargateatlantis
ID: 22753020
it doesn't work.  
0
 
LVL 34

Assisted Solution

by:Aneesh Chopra
Aneesh Chopra earned 500 total points
ID: 22753137
It does work perfectly,
I request to attach your sample file for review so that I can let you know the cause of the issue and as well as solution.
0
 

Author Comment

by:stargateatlantis
ID: 22788622
The reason its not working and i found out why but it would be good to disable.    I am loading a Animation file that was created in Flash 8.  For some reason the tabindex is getting lost from this.  Is there anyway to disable the tabindex on the loaded Animation.

var loadit = new Loader();

loadit.load(new URLRequest("loginnew.swf"));

mcCon.addChild(loadit);

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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 select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

757 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

21 Experts available now in Live!

Get 1:1 Help Now