A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Diasabling tab key (that yellow border)

  1. #1
    Junior Member
    Join Date
    Aug 2003
    Posts
    4

    Diasabling tab key (that yellow border)

    Hi!

    When you press the tab key in a flash movie you are shown the active elements with a big (and ugly) yellow border.

    I am making a game in which the tab key is used, and well, its not so good.

    I could use another action key, like say shift, but shift is not self repeating, you have to keep tapping it, while tab, you can just tap and hold...

    Is there anyway to elliminate this fugly yellow border ?

    W

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Try...

    button._focusrect = false;

    mc._focusrect = false;

    textfield._focusrect = false;

    Or even...

    _global._focusrect = false;

  3. #3
    Junior Member
    Join Date
    Aug 2003
    Posts
    4
    Originally posted by oldnewbie
    Try...

    button._focusrect = false;

    mc._focusrect = false;

    textfield._focusrect = false;

    Or even...

    _global._focusrect = false;
    Cool, how do I use it ?
    Just pasting _global._focusrect = false; into actions wont work...

    W
    Last edited by WSTE_M; 08-16-2003 at 06:04 PM.

  4. #4
    Junior Member
    Join Date
    Aug 2003
    Posts
    4
    Stupid me.

    I got it working.
    But the tab key is still generaly active!

    Everytime the tab key is pressed, a button (or movieclip) is still selected.

    I want to disable that...

    W

  5. #5
    Junior Member
    Join Date
    May 2002
    Posts
    23
    Try this
    Code:
    for (i in this){
    	if(this[i] instanceof MovieClip || this[i] instanceof Object){
    		this[i]._focusrect = false;
    	}
    }
    edit: oh hello OldNewbie. Thought I recognised that footer :] Of all the Flash forums in all the world, I had to walk in to yours... heh.
    Blimey, how many posts have you got here?!!
    Last edited by Mortimer Jazz; 09-21-2003 at 07:32 AM.

  6. #6
    Junior Member
    Join Date
    Aug 2003
    Posts
    4
    I have that part working.

    It just that the tab key in itself is still active!
    when pressing the tabkey, the buttons are "activated"
    Eventhough the yellow border doesent appaer anymore.

    ---
    I want to use the tab key, because it is the only key on the left side on the keyboard that is contious.

    all others (shift) you have to go tappa-tappa-tapppa-tappa
    while tab (and space) you can just hold down...



    W

  7. #7
    Junior Member
    Join Date
    May 2002
    Posts
    23
    Ah right - I just did a test to see what you mean. If it has a rollover state then that's activated.
    I think your only option is to create a MovieClip button instead of using a standard button.
    I just tried this
    code:

    if(Key.isDown(Key.TAB)) {
    this.myButton.enabled=false;
    }


    and as expected it didn't work. I can't think of another solution offhand, but with a movieclip button you'd have frame control.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center