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

**URL:** <https://forum.kirupa.com/t/flash8-how-to-change-key-function-in-defferent-frames/329531>\
**Category:** flash\
**Created:** [September 10, 2012, 7:14pm UTC](https://forum.kirupa.com/t/flash8-how-to-change-key-function-in-defferent-frames/329531 "2012-09-10T19:14:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DirOff](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@DirOff](https://forum.kirupa.com/u/DirOff)\
**Post date:** [September 10, 2012, 7:14pm UTC](https://forum.kirupa.com/t/flash8-how-to-change-key-function-in-defferent-frames/329531/1 "2012-09-10T19:14:04Z")

</div>

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?
