Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : Capturing Backspace Problem



alec mce
4/11/2004 6:44:28 PM
I have created a keylistener class in ActionScript 2.0, and have come across a
curious problem. Backspace is simply not captured by onKeyDown

it goes something like this (this is just the bare bones):

class keylistener {

var test:String = "";

function keylistener() {
Key.addlistener(this);
}

function onKeyDown() {
test += "*";
test += Key.getCode();
}
function onKeyUp() {
test += ",";
}

}

Everything works fine for all buttons that I've tested with the exception of
backspace. I haven't got the correct codes off hand but when I test it, and
trace( __keylistener.test ) I get something like "*62,*44,*32,*43,*32,*6," and
so on, but when I tap backspace I get absolutely nothing. It doesn't appear to
trigger either function.

Does anyone know why? Is this corrected by an update? I am in a rather strange
situation where my only copy of Studio MX is on a PC that I can't hook up to
the internet at the moment, so if there is an update, I can't get hold of it!

Help would be apprectiated!
duuman
4/11/2004 7:51:54 PM
AddThis Social Bookmark Button