Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3440674
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:27:37+00:00 2026-05-18T08:27:37+00:00

For instance, if I have an ordered set of objects [a, b, c, d,

  • 0

For instance, if I have an ordered set of objects [a, b, c, d, e] with their tabIndex property correctly assigned, and the focus is currently on object c, I want to change the focus so that:

a) Nothing is focused;

b) Next time I press tab, object a gets focused.

stage.focus = null solves (a), however it remembers the current index causing object d to be focused when tab is pressed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:27:37+00:00Added an answer on May 18, 2026 at 8:27 am

    Instead of trying to change the index , you could switch the tabEnabled property of the remaining objects to false, when the focus is on the first objet , enabled it again.

    This example is not structured in functions, it’s just demo code to clarify what I mean

        var objects:Array = [a , b , c , d , e];
    
        //set a KeyboardEvent listener &
        //increment the currentIndex value when TAB is pressed
        var currentIndex:int = -1;
    
        //when you need to reset , disable tabEnabled property
        //for remaining objects & reset the currentIndex
        for( var i:int ; i < objects.length ; ++i )
             if( i > currentIndex )
               objects[i].tabEnabled = false;
        currentIndex = -1;
        stage.focus = null;
    

    Press tab again, focus is on a

         //enable objects
        for( var i:int ; i < objects.length ; ++i )
               objects[i].tabEnabled = true;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With this code I have error: Object reference not set to an instance of
Possible Duplicate: Java: recommended solution for deep cloning/copying an instance I have an object
I currently have an ordered JSON string being passed into my iPhone app, which
For instance: I have a swf, lets say A, that loads another swf, B.
For instance I have a string like this : abc123[*]xyz[#]098[~]f9e [*] , [#] and
For instance: I have a purchased a hosting that allows me 10 GB's of
For instance I have a method SomeMethod(Graphics g) { ... } If I will
For an instance you have an array: $unsorted = array( 'desert' => array( 'time'
Let's say for an instance I have this string: var a=23434,bc=3434,erd=5656,ddfeto='dsf3df34dff3',eof='sdfwerwer34',wer=4554; How should I
I need to mock a GrailsControllerClass interface. Instance should have a static variable defined.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.