|
-
Senior Member
[AS3] Keyboard cursor out of textfield event
Hi,
I looked around but I didn't find any event sent by the TextField whe the keyboard cursor enters or leaves the field ?
-
Senior Member
What exactly are you trying to do here, your post is quite vague. Could you be more specific? Then I may be able to help.
-
Senior Member
Sorry for the delay and for being too vague.
Actually I would like to know if the cursor/carret is inside an input text field.
For example, let's say, the application listens to the spacebar event, and has to start a specific action when the use press the space bar. I would like to disable this action if the user is currently entering a text in an input text field.
-
Senior Member
I've found out that I haev to use the focus mnager to know if the cursor is in the text field.
PHP Code:
if (stage.focus != myInputBox) then doMyAction();
-
a.k.a gltovar
 Originally Posted by Sietjp
Hi,
I looked around but I didn't find any event sent by the TextField whe the keyboard cursor enters or leaves the field ?
I know you said you had a solution but
Code:
someTextField.addEventListener(FocusEvent.FOCUS_OUT, focusOutEvent);
there are 4 available focus events:
FOCUS_IN
FOCUS_OUT
KEY_FOCUS_CHANGE
MOUSE_FOCUS_CHANGE
-
Senior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|