Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Focus on tab or shift tab

Posted on 2008-10-19
4
Medium Priority
?
1,035 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 2000 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to record live broadcast.

926 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