Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab Key 1

Status
Not open for further replies.

wangbar

Programmer
Jul 23, 2001
1,906
GB
I'm trying to trap a press of the TAB key for an interface and Flash won't read it. I can pick up every other key on the keyboard including function keys and capslock etc. but TAB won't read. I've tried using the keycode and Key.TAB to no avail. And, no, the keyboard is not broken - TAB works fine in other programs and I've tried the same script on other machines and it doesn't work on them either.

Here's the script I've been using...

onClipEvent (keyDown) {
keyPressed=Key.getCode();
trace(keyPressed);
}

It returns values for everything the key I want (which should read "9").

 
Hi!
2 thoughts on this!

One wild one!... Could this have anything to do with this?

Second... Have a look at this:

This swf has really nothing to do with this, it just happened to be what I was working on when I read your post.
Hit the tab key on it!
Although this doesn't work when testing it within the application (maybe trying to trap the Tab key within never does!), it does work outside the application.
Simply used an invisible button with this code:

on (keyPress &quot;<Tab>&quot;) {
// trace (&quot;Tab Key pressed&quot;); // Doesn't work within!
message = &quot;Tab Key pressed!&quot;;
}

Regards,
mywink.gif
ldnewbie
 
Nice one - I searched the Macromedia site and didn't find this page. Thanks, a star for your trouble.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top