Question to denvish, how can i make it so somebody is walking left or right and and clicking will make them shoot while still moving. I have 2 seperate frames, one with still legs and a shooting animation, and one with a movie clip of walking legs and a shooting animation. I want to have it so when you're holding right and click it goes to the walking/shooting frame, and plays (It stops after the shot is over) which is frame 9. And when its just regular shooting without moviement go to frame 3. This is what i already have entered in.
onClipEvent (load) {
speed = 4;
stop();
dir = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_x += speed;
gotoAndStop(2);
dir = 0;
} else if (Key.isDown(Key.LEFT)) {
_x -= speed;
gotoAndStop(15);
dir = 1;
} else {
if (dir == 0) {
gotoAndStop(1);
} else {
gotoAndStop(4);
}
}
}