What if you use the KeyboardEvent.KEY_UP event instead? I don't know
what you're trying to accomplish, but I've always used the
KeyboardEvents for textfield interactions.
Alan
Hey List,
Consider something like this:
//inputTextField is multilined and wordWrapped
inputTextField.addEventListener(Event.CHANGE, changeHandler);
//All this does is trace when fired
function changeHandler(e:Event):void {
trace("fired");
}
I expected this to fire when backspacing over a carriage return (ie,
when
pressing backspace reduces the number of lines in the textfield by
one), but
it doesn't. To try for yourself:
1. Type "Hello", then press enter, then type "world". You should
have 2
lines of text.
2. Press backspace 5 times (so that "world" is gone, but the cursor
is still
on line 2). The changeHandler should fire all 5 times.
3. Press backspace one more time (so that the cursor is at the end
of line
1). ... Am I the only one who isn't getting a changeHandler fired at
me?!
Note: It works fine in the opposite direction - ie, if you're using
the
delete key rather than the backspace. But I really need to be able
to detect
backspace so I can rearrange the y positions of other things on my
stage.
If anyone has any suggestions or comments, it would be most
appreciated!
Thanks!
CB.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders