[Flash8]How to change key function in defferent frames?

So I have a code:

if (Key.isDown(Key.RIGHT)) {
man.gotoAndStop(3);
man._x+=3;
}else if (Key.isDown(Key.LEFT)){
man.gotoAndStop(4);
man._x-=3;
}
};
keyListener.onKeyUp = function() {
if (Key.getCode() == Key.RIGHT){
man.gotoAndStop(1);
}else if (Key.getCode() == Key.LEFT){
man.gotoAndStop(2);
}
};

That code moves character in frame 1.

And for example I want LEFT key not to mave my character, but to do something else in second frame. So how I can do that?