Hi, I have a two part question.
The first is, is there a command for having all keys down, for example, " Key.isDown('all keys command')". The reason is, I'm trying to make a command for 'if all the keys AREN'T down'. This may seem stupid, but the reason for this is because I want my HERO MC to play the stand animation (frame one inside the MC) if none of the keys are down, but for some reason, the way I have it set up doesn't seem to work, the code right now, is as follows:
onClipEvent(enterFrame) {
gotoAndStop(1);
if(Key.isDown(Key.RIGHT)) {
_x += 5;
gotoAndStop(2);
}
if(Key.isDown(Key.LEFT)) {
_x -= 5;
gotoAndStop(2);
}
}
He plays the stand when not moving, but, when he does move, for some reason it only plays the first frame of the walk animation. Lately, I've been trying a new way of coding more professionally than I used to, so this has been a great bother to me, especially when I feel the answer should be so simple to figure out.
Finally, I'd like to reiterate my question, can someone tell me if there's a command for all keys, or better yet, an easy method of fixing this problem. Any help is greatly appreciated!