Hi,
I am trying to recreate an interface where the numpad keys 1-9 are involved, as well as buttons for "ok", "back" and "go to start". My problem is that these keys need different actions depending on which frame I'm on. For example, on the first frame, the 1 key takes you to frame 5, but on frame 5, the 1 key should take you to frame 15. And maybe on frame 40, the 1 key means "go to frame 10".
How do I tell Flash that when on a new frame, the previous key functions should be ignored? Or is there perhaps a better way to solve this?
My simple code so far:
stage.addEventListener(KeyboardEvent.KEY_DOWN,fl_K eyboardDownHandler_1);
function fl_KeyboardDownHandler_1(event:KeyboardEvent):void
{
if(event.keyCode == (97)){
gotoAndStop (5);
}
if(event.keyCode == (107)){
gotoAndStop (10);
}
if(event.keyCode == (109)){
gotoAndStop (1);
}
}
I want to be able to give these keys (and more) different commands when on other frames..
thx


Reply With Quote


Bookmarks