Quick code question

quick paste of the problem code:

onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
gotoAndPlay(“walk”);
this._xscale = 100;
}
}

ok so right here, when i hold down the right arrow key my character should start playing the “walk” animation, which is several frames. the problem is she freezes on the first frame and only PLAYS the walk animation after i let go of the key lol. How do i get it to actually play while holding down the button?

because you tell it to go and play the “walk” frame, which is 1 frame, on each enterframe… you’re telling the clip to restart the animation per frame.