help

3 posts

Flag Post

ok well i’m updating the smart test http://www.kongregate.com/games/phore_eyes/the-smart-test
and i have made it so you cannot get more than 1 point per question ( i put in a iittle surprise for anyone that trys to. but now i need to make it so that when you hit TAB it goes to frame 298 can anyone help???

 
Flag Post

You could use:

 SomeMovieClip_mc.onEnterFrame = function() {
// 9 is the Tab Key
if (Key.isDown(9)) {
gotoAndStop(298);
}
}

If you already have an onEnterFrame, just put it in there.

 
Flag Post

That method is fine if you need to check if a key is being held down on every frame, but if you only need to capture a single key press, you should define a key handler.

Key.addListener(this);

this.onKeyUp = keyHandler;

function keyHandler() {
  switch(Key.getCode()) {
    case 9:
      gotoAndStop(298);
      break;
  }
}