Running thing

I am making a game with a guy running, and when the key is let go he is still running or the animation is still going, how would i make it when the key is up he stops running?

on the timeline containing the runner(instance name runner_mc)
runner_mc.onEnterFrame = function() {
if (key.isDown(Key.LEFT)) {
this.play();
} else {
this.stop();
}
};