Groups | Blog | Home
all groups > flash actionscript > july 2007 >

flash actionscript : Can't remove Key listeners


gilesrulz
7/31/2007 8:09:05 PM
I have been having the worst time getting these key listeners to go away! Any
help would be greatly appreciated. Please see attached code. I even tried
putting the remove listener on the next frame, and that didn't work either.

tabPress.onKeyDown = function() {
if (Key.isDown(Key.TAB)) {
if (fName_txt.text.toLowerCase() == "allison") {
gotoAndPlay("Slide_83");
Key.removeListener(tabPress);
}
}
};
Key.addListener(tabPress);

kglad
7/31/2007 8:14:10 PM
try:



tabPress.onKeyDown = function() {
if (Key.isDown(Key.TAB)) {
if (fName_txt.text.toLowerCase() == "allison") {
Key.removeListener(tabPress);
gotoAndPlay("Slide_83");
}
}
};
Key.addListener(tabPress);
AddThis Social Bookmark Button