# Quick code question

**URL:** <https://forum.kirupa.com/t/quick-code-question/261143>\
**Category:** Uncategorized\
**Created:** [May 23, 2008, 2:20pm UTC](https://forum.kirupa.com/t/quick-code-question/261143 "2008-05-23T14:20:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axauv](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@Axauv](https://forum.kirupa.com/u/Axauv)\
**Post date:** [May 23, 2008, 2:20pm UTC](https://forum.kirupa.com/t/quick-code-question/261143/1 "2008-05-23T14:20:26Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![eilsoe](https://avatars.discourse-cdn.com/v4/letter/e/9fc348/32.png) [@eilsoe](https://forum.kirupa.com/u/eilsoe)\
**Post date:** [May 23, 2008, 2:46pm UTC](https://forum.kirupa.com/t/quick-code-question/261143/2 "2008-05-23T14:46:05Z")

</div>

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.
