i am making a game where the main charecter is in the middle of the screen and when he moves left or right the animation of him moving plays and the ground moves in the opposite direction
but when you release one of the keys the animation of the charecter moving in that direction continues
http://img295.imageshack.us/my.php?i...stratortb3.swf
that is the game and i used this code to make it play an animation:
Quote:
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT)){
gotoAndStop("right");
}
if(Key.isDown(Key.LEFT)){
gotoAndStop("left");
}
}
does anyone know a way of stopping this from happening
